@@ -42,4 +42,11 @@ setup() {
|
||||
@test "plan/inputs/directories exists" {
|
||||
cd "$TESTDIR"
|
||||
"$DAGGER" --europa up ./plan/inputs/directories/exists.cue
|
||||
}
|
||||
|
||||
@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"'
|
||||
}
|
15
tests/plan/inputs/directories/conflicting_values.cue
Normal file
15
tests/plan/inputs/directories/conflicting_values.cue
Normal file
@@ -0,0 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/europa/dagger/engine"
|
||||
)
|
||||
|
||||
engine.#Plan & {
|
||||
inputs: directories: test: path: "./plan/inputs/directories"
|
||||
actions: verify: engine.#ReadFile & {
|
||||
input: inputs.directories.test.contents
|
||||
path: "test.txt"
|
||||
} & {
|
||||
contents: "local dfsadf" // should fail with conflicting values
|
||||
}
|
||||
}
|
@@ -1,16 +1,15 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/europa/dagger"
|
||||
"alpha.dagger.io/europa/dagger/engine"
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
input: directories: test: path: "./plan/inputs/directories"
|
||||
engine.#Plan & {
|
||||
inputs: directories: test: path: "./plan/inputs/directories"
|
||||
actions: verify: engine.#ReadFile & {
|
||||
input: input.directories.test.contents
|
||||
input: inputs.directories.test.contents
|
||||
path: "test.txt"
|
||||
} & {
|
||||
contents: "local directory\n"
|
||||
contents: "local directory"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user