added new test for input directories

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones 2021-12-16 12:30:09 -07:00
parent 0ed6327344
commit 73e12296d3
No known key found for this signature in database
GPG Key ID: CFB3A382EB166F4C
2 changed files with 25 additions and 10 deletions

View File

@ -10,31 +10,36 @@ setup() {
"$DAGGER" --europa up ./plan/hello-europa
}
@test "plan/context/services invalid schema" {
@test "plan/proxy invalid schema" {
cd "$TESTDIR"
run "$DAGGER" --europa up ./plan/context/services/invalid_schema.cue
run "$DAGGER" --europa up ./plan/proxy/invalid_schema.cue
assert_failure
}
@test "plan/context/services invalid value" {
@test "plan/proxy invalid value" {
cd "$TESTDIR"
run "$DAGGER" --europa up ./plan/context/services/invalid_value.cue
run "$DAGGER" --europa up ./plan/proxy/invalid_value.cue
assert_failure
}
@test "plan/context/services incomplete unix" {
@test "plan/proxy incomplete unix" {
cd "$TESTDIR"
run "$DAGGER" --europa up ./plan/context/services/incomplete_unix.cue
run "$DAGGER" --europa up ./plan/proxy/incomplete_unix.cue
assert_failure
}
@test "plan/context/services incomplete service" {
@test "plan/proxy incomplete service" {
cd "$TESTDIR"
run "$DAGGER" --europa up ./plan/context/services/incomplete_service.cue
run "$DAGGER" --europa up ./plan/proxy/incomplete_service.cue
assert_output --partial "pipeline was partially executed because of missing inputs"
}
@test "plan/context/services unix" {
@test "plan/proxy unix" {
cd "$TESTDIR"
"$DAGGER" --europa up ./plan/context/services/unix.cue
"$DAGGER" --europa up ./plan/proxy/unix.cue
}
@test "plan/inputs/directories exists" {
cd "$TESTDIR"
"$DAGGER" --europa up ./plan/inputs/directories/exists.cue
}

View File

@ -0,0 +1,10 @@
package main
import (
"alpha.dagger.io/europa/dagger"
)
dagger.#Plan & {
input: directories: test: path: "./plan/inputs/directories"
actions: verify: input.directories.test.contents
}