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" {
|
||||
# Europa loader handles the cwd differently, therefore we need to CD into the tree at or below the parent of cue.mod
|
||||
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
|
||||
refute_output
|
||||
refute_output --partial "actions.test.b"
|
||||
}
|
||||
|
||||
@test "plan/do dynamic tasks - fails to run tasks" {
|
||||
run "$DAGGER" "do" -p ./plan/do/dynamic_tasks.cue "test"
|
||||
assert_failure
|
||||
assert_output --partial 'outputs.files.andrea: contents is not set'
|
||||
refute_output --partial 'actions.test.b.y'
|
||||
}
|
||||
|
||||
@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.three.script"
|
||||
assert_output --partial "actions.test.two.script"
|
||||
|
@ -8,8 +8,8 @@ import (
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
outputs: files: andrea: {
|
||||
dest: "./andrea_do"
|
||||
outputs: files: dagger: {
|
||||
dest: "./dagger_do"
|
||||
contents: actions.test.b.y.export.files["/output.txt"]
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ dagger.#Plan & {
|
||||
test: {
|
||||
a: bash.#Run & {
|
||||
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
|
||||
}
|
||||
b: {
|
||||
@ -41,9 +41,9 @@ dagger.#Plan & {
|
||||
}
|
||||
}
|
||||
|
||||
// notMe: bash.#Run & {
|
||||
// input: image.output
|
||||
// script: contents: "false"
|
||||
// }
|
||||
notMe: bash.#Run & {
|
||||
input: image.output
|
||||
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