diff --git a/tests/tasks.bats b/tests/tasks.bats index 6b77d043..72d8f90f 100644 --- a/tests/tasks.bats +++ b/tests/tasks.bats @@ -97,4 +97,12 @@ setup() { cd "$TESTDIR"/tasks/gitPull/ "$DAGGER" --europa up ./exists.cue "$DAGGER" --europa up ./gitdir.cue + run "$DAGGER" --europa up ./invalid.cue + assert_failure + run "$DAGGER" --europa up ./badremote.cue + assert_failure + run "$DAGGER" --europa up ./badref.cue + assert_failure + + } diff --git a/tests/tasks/gitPull/badref.cue b/tests/tasks/gitPull/badref.cue new file mode 100644 index 00000000..f49fc236 --- /dev/null +++ b/tests/tasks/gitPull/badref.cue @@ -0,0 +1,10 @@ +package main + +import "alpha.dagger.io/europa/dagger/engine" + +engine.#Plan & { + actions: badref: engine.#GitPull & { + remote: "https://github.com/blocklayerhq/acme-clothing.git" + ref: "lalalalal" + } +} diff --git a/tests/tasks/gitPull/badremote.cue b/tests/tasks/gitPull/badremote.cue new file mode 100644 index 00000000..b926ed97 --- /dev/null +++ b/tests/tasks/gitPull/badremote.cue @@ -0,0 +1,10 @@ +package main + +import "alpha.dagger.io/europa/dagger/engine" + +engine.#Plan & { + actions: badremote: engine.#GitPull & { + remote: "https://github.com/blocklayerhq/lalalala.git" + ref: "master" + } +} diff --git a/tests/tasks/gitPull/invalid.cue b/tests/tasks/gitPull/invalid.cue new file mode 100644 index 00000000..61d83638 --- /dev/null +++ b/tests/tasks/gitPull/invalid.cue @@ -0,0 +1,7 @@ +package main + +import "alpha.dagger.io/europa/dagger/engine" + +engine.#Plan & { + actions: invalid: engine.#GitPull & {} +}