2021-12-09 00:24:16 +01:00
|
|
|
setup() {
|
|
|
|
load 'helpers'
|
|
|
|
|
|
|
|
common_setup
|
|
|
|
}
|
|
|
|
|
2021-12-14 22:29:20 +01:00
|
|
|
@test "plan/hello" {
|
2021-12-09 22:32:26 +01:00
|
|
|
# Europa loader handles the cwd differently, therefore we need to CD into the tree at or below the parent of cue.mod
|
2021-12-09 23:59:48 +01:00
|
|
|
cd "$TESTDIR"
|
2021-12-11 00:06:14 +01:00
|
|
|
"$DAGGER" --europa up ./plan/hello-europa
|
|
|
|
}
|
|
|
|
|
2021-12-16 20:30:09 +01:00
|
|
|
@test "plan/proxy invalid schema" {
|
2021-12-11 00:06:14 +01:00
|
|
|
cd "$TESTDIR"
|
2021-12-16 20:30:09 +01:00
|
|
|
run "$DAGGER" --europa up ./plan/proxy/invalid_schema.cue
|
2021-12-14 22:29:20 +01:00
|
|
|
assert_failure
|
|
|
|
}
|
|
|
|
|
2021-12-16 20:30:09 +01:00
|
|
|
@test "plan/proxy invalid value" {
|
2021-12-14 22:29:20 +01:00
|
|
|
cd "$TESTDIR"
|
2021-12-16 20:30:09 +01:00
|
|
|
run "$DAGGER" --europa up ./plan/proxy/invalid_value.cue
|
2021-12-14 22:29:20 +01:00
|
|
|
assert_failure
|
|
|
|
}
|
|
|
|
|
2021-12-16 20:30:09 +01:00
|
|
|
@test "plan/proxy incomplete unix" {
|
2021-12-14 22:29:20 +01:00
|
|
|
cd "$TESTDIR"
|
2021-12-16 20:30:09 +01:00
|
|
|
run "$DAGGER" --europa up ./plan/proxy/incomplete_unix.cue
|
2021-12-14 22:29:20 +01:00
|
|
|
assert_failure
|
|
|
|
}
|
|
|
|
|
2021-12-16 20:30:09 +01:00
|
|
|
@test "plan/proxy incomplete service" {
|
2021-12-14 22:29:20 +01:00
|
|
|
cd "$TESTDIR"
|
2021-12-16 20:30:09 +01:00
|
|
|
run "$DAGGER" --europa up ./plan/proxy/incomplete_service.cue
|
2021-12-14 22:29:20 +01:00
|
|
|
assert_output --partial "pipeline was partially executed because of missing inputs"
|
|
|
|
}
|
|
|
|
|
2021-12-16 20:30:09 +01:00
|
|
|
@test "plan/proxy unix" {
|
2021-12-14 22:29:20 +01:00
|
|
|
cd "$TESTDIR"
|
2021-12-16 20:30:09 +01:00
|
|
|
"$DAGGER" --europa up ./plan/proxy/unix.cue
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "plan/inputs/directories exists" {
|
|
|
|
cd "$TESTDIR"
|
|
|
|
"$DAGGER" --europa up ./plan/inputs/directories/exists.cue
|
2021-12-17 19:24:50 +01:00
|
|
|
}
|
|
|
|
|
2021-12-17 21:37:20 +01:00
|
|
|
@test "plan/inputs/directories not exists" {
|
|
|
|
cd "$TESTDIR"
|
|
|
|
run "$DAGGER" --europa up ./plan/inputs/directories/not_exists.cue
|
|
|
|
assert_failure
|
|
|
|
assert_output --partial 'tests/fasdfsdfs" does not exist'
|
|
|
|
}
|
|
|
|
|
2021-12-17 19:24:50 +01:00
|
|
|
@test "plan/inputs/directories conflicting values" {
|
|
|
|
cd "$TESTDIR"
|
|
|
|
run "$DAGGER" --europa up ./plan/inputs/directories/conflicting_values.cue
|
|
|
|
assert_failure
|
|
|
|
assert_output --partial 'failed to up environment: actions.verify.contents: conflicting values "local directory" and "local dfsadf"'
|
2021-12-09 00:24:16 +01:00
|
|
|
}
|