2021-12-09 21:07:52 +01:00
|
|
|
setup() {
|
|
|
|
load 'helpers'
|
|
|
|
|
|
|
|
common_setup
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "task: #Pull" {
|
|
|
|
cd "$TESTDIR"/tasks/pull
|
2021-12-16 04:57:44 +01:00
|
|
|
"$DAGGER" --europa up ./pull.cue
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "task: #Pull with auth" {
|
|
|
|
cd "$TESTDIR"/tasks/pull
|
|
|
|
"$DAGGER" --europa up ./pull_auth.cue
|
2021-12-13 17:48:32 +01:00
|
|
|
}
|
|
|
|
|
2021-12-21 02:31:04 +01:00
|
|
|
@test "task: #Push" {
|
|
|
|
cd "$TESTDIR"/tasks/push
|
|
|
|
"$DAGGER" --europa up ./push.cue
|
|
|
|
}
|
|
|
|
|
2021-12-13 17:48:32 +01:00
|
|
|
@test "task: #ReadFile" {
|
|
|
|
cd "$TESTDIR"/tasks/readfile
|
2021-12-16 21:42:28 +01:00
|
|
|
"$DAGGER" --europa up
|
2021-12-15 00:32:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@test "task: #WriteFile" {
|
2021-12-15 21:09:20 +01:00
|
|
|
cd "$TESTDIR"/tasks/writefile
|
2021-12-16 21:42:28 +01:00
|
|
|
"$DAGGER" --europa up ./writefile.cue
|
2021-12-15 00:32:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@test "task: #WriteFile failure: different contents" {
|
2021-12-15 21:09:20 +01:00
|
|
|
cd "$TESTDIR"/tasks/writefile
|
2021-12-16 21:42:28 +01:00
|
|
|
run "$DAGGER" --europa up ./writefile_failure_diff_contents.cue
|
2021-12-15 00:32:31 +01:00
|
|
|
assert_failure
|
2021-12-15 21:35:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@test "task: #Exec" {
|
|
|
|
cd "$TESTDIR"/tasks/exec
|
|
|
|
"$DAGGER" --europa up ./args.cue
|
|
|
|
"$DAGGER" --europa up ./env.cue
|
|
|
|
"$DAGGER" --europa up ./hosts.cue
|
|
|
|
|
2021-12-21 14:33:25 +01:00
|
|
|
"$DAGGER" --europa up ./mount_cache.cue
|
2021-12-15 21:35:05 +01:00
|
|
|
"$DAGGER" --europa up ./mount_fs.cue
|
|
|
|
TESTSECRET="hello world" "$DAGGER" --europa up ./mount_secret.cue
|
|
|
|
"$DAGGER" --europa up ./mount_tmp.cue
|
2021-12-17 15:39:32 +01:00
|
|
|
"$DAGGER" --europa up ./mount_service.cue
|
2021-12-15 21:35:05 +01:00
|
|
|
|
|
|
|
"$DAGGER" --europa up ./user.cue
|
|
|
|
"$DAGGER" --europa up ./workdir.cue
|
2021-12-16 04:57:44 +01:00
|
|
|
}
|
2021-12-17 23:58:52 +01:00
|
|
|
|
|
|
|
@test "task: #Copy" {
|
|
|
|
cd "$TESTDIR"/tasks/copy
|
|
|
|
"$DAGGER" --europa up ./copy_exec.cue
|
|
|
|
"$DAGGER" --europa up ./copy_file.cue
|
2021-12-17 20:29:15 +01:00
|
|
|
|
2021-12-17 23:58:52 +01:00
|
|
|
run "$DAGGER" --europa up ./copy_exec_invalid.cue
|
|
|
|
assert_failure
|
|
|
|
}
|
2021-12-17 20:29:15 +01:00
|
|
|
|
|
|
|
@test "task: #Mkdir" {
|
2021-12-17 22:17:06 +01:00
|
|
|
# Make directory
|
2021-12-17 20:29:15 +01:00
|
|
|
cd "$TESTDIR"/tasks/mkdir
|
|
|
|
"$DAGGER" --europa up ./mkdir.cue
|
|
|
|
|
2021-12-17 22:17:06 +01:00
|
|
|
# Create parents
|
2021-12-17 20:29:15 +01:00
|
|
|
cd "$TESTDIR"/tasks/mkdir
|
|
|
|
"$DAGGER" --europa up ./mkdir_parents.cue
|
|
|
|
|
2021-12-17 22:17:06 +01:00
|
|
|
# Disable parents creation
|
2021-12-17 20:29:15 +01:00
|
|
|
cd "$TESTDIR"/tasks/mkdir
|
|
|
|
run "$DAGGER" --europa up ./mkdir_failure_disable_parents.cue
|
|
|
|
assert_failure
|
2021-12-20 19:52:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
@test "task: #Build" {
|
|
|
|
cd "$TESTDIR"/tasks/build
|
|
|
|
|
|
|
|
"$DAGGER" --europa up ./dockerfile.cue
|
|
|
|
"$DAGGER" --europa up ./inlined_dockerfile.cue
|
|
|
|
"$DAGGER" --europa up ./dockerfile_path.cue
|
|
|
|
"$DAGGER" --europa up ./build_args.cue
|
|
|
|
"$DAGGER" --europa up ./image_config.cue
|
|
|
|
"$DAGGER" --europa up ./labels.cue
|
|
|
|
"$DAGGER" --europa up ./platform.cue
|
2021-12-21 14:16:33 +01:00
|
|
|
|
|
|
|
"$DAGGER" --europa up ./build_auth.cue
|
2021-12-20 19:52:22 +01:00
|
|
|
}
|
2021-12-21 17:16:33 +01:00
|
|
|
@test "task: #Scratch" {
|
|
|
|
cd "$TESTDIR"/tasks/scratch
|
|
|
|
"$DAGGER" --europa up ./scratch.cue -l debug
|
|
|
|
}
|
|
|
|
|
2021-12-20 20:47:42 +01:00
|
|
|
@test "task: #GitPull" {
|
|
|
|
cd "$TESTDIR"/tasks/gitPull/
|
|
|
|
"$DAGGER" --europa up ./exists.cue
|
2021-12-20 21:30:55 +01:00
|
|
|
"$DAGGER" --europa up ./gitdir.cue
|
2021-12-22 19:58:35 +01:00
|
|
|
"$DAGGER" --europa up ./privateRepo.cue
|
|
|
|
|
|
|
|
run "$DAGGER" --europa up ./invalid.cue
|
|
|
|
assert_failure
|
|
|
|
run "$DAGGER" --europa up ./badremote.cue
|
|
|
|
assert_failure
|
|
|
|
run "$DAGGER" --europa up ./badref.cue
|
|
|
|
assert_failure
|
2021-12-20 22:08:05 +01:00
|
|
|
|
|
|
|
|
2021-12-20 20:47:42 +01:00
|
|
|
}
|