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
|
|
|
}
|
|
|
|
|
|
|
|
@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-18 00:46:51 +01:00
|
|
|
# FIXME: disabled - flaky
|
|
|
|
# "$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" {
|
|
|
|
cd "$TESTDIR"/tasks/mkdir
|
|
|
|
"$DAGGER" --europa up ./mkdir.cue
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "task: #Mkdir: create parents" {
|
|
|
|
cd "$TESTDIR"/tasks/mkdir
|
|
|
|
"$DAGGER" --europa up ./mkdir_parents.cue
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "task: #Mkdir failure: disable parents creation" {
|
|
|
|
cd "$TESTDIR"/tasks/mkdir
|
|
|
|
run "$DAGGER" --europa up ./mkdir_failure_disable_parents.cue
|
|
|
|
assert_failure
|
|
|
|
}
|