From 026c7641b34e9270508ff6f3981c0eac4b82b135 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 9 Dec 2021 11:30:15 -0700 Subject: [PATCH] refactored test to use CUE validations rather than container stdout Signed-off-by: Richard Jones --- tests/plan.bats | 1 - tests/plan/hello-europa/main.cue | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/plan.bats b/tests/plan.bats index 71810688..7ab5bad0 100644 --- a/tests/plan.bats +++ b/tests/plan.bats @@ -7,5 +7,4 @@ setup() { @test "plan: hello" { run dagger --no-cache --europa up ./plan/hello-europa assert_success - assert_output --partial 'Hello Europa!' } \ No newline at end of file diff --git a/tests/plan/hello-europa/main.cue b/tests/plan/hello-europa/main.cue index f268a18d..466f34f9 100644 --- a/tests/plan/hello-europa/main.cue +++ b/tests/plan/hello-europa/main.cue @@ -6,7 +6,11 @@ import ( ) engine.#Plan & { - actions: sayHello: os.#Container & { - command: "echo Hello Europa!" + actions: { + sayHello: os.#Container & { + command: "echo Hello Europa! > /out.txt" + } + + verify: "Hello Europa!\n" & (os.#File & {from: sayHello, path: "/out.txt"}).contents } }