From 1384b025b7cc7f6368683bd71bee4adf446a4aaa Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 20 Dec 2021 14:08:05 -0700 Subject: [PATCH] more tests Signed-off-by: Richard Jones --- tests/tasks.bats | 8 ++++++++ tests/tasks/gitPull/badref.cue | 10 ++++++++++ tests/tasks/gitPull/badremote.cue | 10 ++++++++++ tests/tasks/gitPull/invalid.cue | 7 +++++++ 4 files changed, 35 insertions(+) create mode 100644 tests/tasks/gitPull/badref.cue create mode 100644 tests/tasks/gitPull/badremote.cue create mode 100644 tests/tasks/gitPull/invalid.cue 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 & {} +}