Clean up tests
Signed-off-by: Joel Longtine <joel@dagger.io>
This commit is contained in:
parent
648e508c60
commit
cf2538e1b2
@ -7,19 +7,18 @@ setup() {
|
|||||||
@test "plan/do dynamic tasks - fails to find tasks" {
|
@test "plan/do dynamic tasks - fails to find tasks" {
|
||||||
# Europa loader handles the cwd differently, therefore we need to CD into the tree at or below the parent of cue.mod
|
# Europa loader handles the cwd differently, therefore we need to CD into the tree at or below the parent of cue.mod
|
||||||
cd "$TESTDIR"
|
cd "$TESTDIR"
|
||||||
run "$DAGGER" "do" -p ./plan/do/dynamic_tasks.cue "test" "b"
|
run "$DAGGER" do -p ./plan/do/dynamic_tasks.cue test b
|
||||||
# No output because of weirdness with dynamic tasks, which causes it to fail
|
# No output because of weirdness with dynamic tasks, which causes it to fail
|
||||||
refute_output
|
refute_output --partial "actions.test.b"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "plan/do dynamic tasks - fails to run tasks" {
|
@test "plan/do dynamic tasks - fails to run tasks" {
|
||||||
run "$DAGGER" "do" -p ./plan/do/dynamic_tasks.cue "test"
|
run "$DAGGER" "do" -p ./plan/do/dynamic_tasks.cue "test"
|
||||||
assert_failure
|
refute_output --partial 'actions.test.b.y'
|
||||||
assert_output --partial 'outputs.files.andrea: contents is not set'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "plan/do don't run unspecified tasks" {
|
@test "plan/do don't run unspecified tasks" {
|
||||||
run "$DAGGER" "do" -p ./plan/do/do_not_run_unspecified_tasks.cue "test"
|
run "$DAGGER" "do" -p ./plan/do/do_not_run_unspecified_tasks.cue test
|
||||||
assert_output --partial "actions.test.one.script"
|
assert_output --partial "actions.test.one.script"
|
||||||
assert_output --partial "actions.test.three.script"
|
assert_output --partial "actions.test.three.script"
|
||||||
assert_output --partial "actions.test.two.script"
|
assert_output --partial "actions.test.two.script"
|
||||||
|
@ -8,8 +8,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
dagger.#Plan & {
|
dagger.#Plan & {
|
||||||
outputs: files: andrea: {
|
outputs: files: dagger: {
|
||||||
dest: "./andrea_do"
|
dest: "./dagger_do"
|
||||||
contents: actions.test.b.y.export.files["/output.txt"]
|
contents: actions.test.b.y.export.files["/output.txt"]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ dagger.#Plan & {
|
|||||||
test: {
|
test: {
|
||||||
a: bash.#Run & {
|
a: bash.#Run & {
|
||||||
input: image.output
|
input: image.output
|
||||||
script: contents: "echo -n 'from andrea with love' > /output.txt"
|
script: contents: "echo -n 'from dagger with love' > /output.txt"
|
||||||
export: files: "/output.txt": string
|
export: files: "/output.txt": string
|
||||||
}
|
}
|
||||||
b: {
|
b: {
|
||||||
@ -41,9 +41,9 @@ dagger.#Plan & {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// notMe: bash.#Run & {
|
notMe: bash.#Run & {
|
||||||
// input: image.output
|
input: image.output
|
||||||
// script: contents: "false"
|
script: contents: "false"
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
1
tests/project/init/cue.mod/module.cue
Normal file
1
tests/project/init/cue.mod/module.cue
Normal file
@ -0,0 +1 @@
|
|||||||
|
module: "github.com/foo/bar"
|
Reference in New Issue
Block a user