diff --git a/tests/plan.bats b/tests/plan.bats index 03e95f44..aed5b3f8 100644 --- a/tests/plan.bats +++ b/tests/plan.bats @@ -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" diff --git a/tests/plan/do/dynamic_tasks.cue b/tests/plan/do/dynamic_tasks.cue index b02de097..7b44cf61 100644 --- a/tests/plan/do/dynamic_tasks.cue +++ b/tests/plan/do/dynamic_tasks.cue @@ -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" + } } } diff --git a/tests/project/init/cue.mod/module.cue b/tests/project/init/cue.mod/module.cue new file mode 100644 index 00000000..83ddb3bc --- /dev/null +++ b/tests/project/init/cue.mod/module.cue @@ -0,0 +1 @@ +module: "github.com/foo/bar" \ No newline at end of file