fixes issue where dagger hands when input directory does not exist
Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
@@ -44,6 +44,13 @@ setup() {
|
||||
"$DAGGER" --europa up ./plan/inputs/directories/exists.cue
|
||||
}
|
||||
|
||||
@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'
|
||||
}
|
||||
|
||||
@test "plan/inputs/directories conflicting values" {
|
||||
cd "$TESTDIR"
|
||||
run "$DAGGER" --europa up ./plan/inputs/directories/conflicting_values.cue
|
||||
|
16
tests/plan/inputs/directories/not_exists.cue
Normal file
16
tests/plan/inputs/directories/not_exists.cue
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/europa/dagger/engine"
|
||||
)
|
||||
|
||||
engine.#Plan & {
|
||||
// should fail because path does not exist locally
|
||||
inputs: directories: test: path: "./fasdfsdfs"
|
||||
actions: verify: engine.#ReadFile & {
|
||||
input: inputs.directories.test.contents
|
||||
path: "test.txt"
|
||||
} & {
|
||||
contents: "local directory"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user