From 1ac0041c534589638f5e6bc9e4c2c472e448b005 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Thu, 15 Apr 2021 13:06:11 -0700 Subject: [PATCH] test: react example: use dagger up instead of compute Signed-off-by: Andrea Luzzardi --- tests/examples.bats | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/examples.bats b/tests/examples.bats index 22f93a9c..f5796060 100644 --- a/tests/examples.bats +++ b/tests/examples.bats @@ -5,12 +5,16 @@ setup() { } @test "example: react" { - skip_unless_secrets_available "$TESTDIR"/examples/react/inputs.yaml + skip_unless_secrets_available "$TESTDIR"/examples/react/inputs.yaml - run "$DAGGER" compute -l fatal "$TESTDIR"/../examples/react --input-yaml "$TESTDIR"/examples/react/inputs.yaml - assert_success - url=$(echo "$output" | jq -r .www.deployUrl) - run curl -sS "$url" - assert_success - assert_output --partial "Todo App" + "$DAGGER" new --plan-dir "$TESTDIR"/../examples/react react + sops -d "$TESTDIR"/examples/react/inputs.yaml | "$DAGGER" -d "react" input yaml "" -f - + "$DAGGER" up -d "react" + + # curl the URL we just deployed to check if it worked + deployUrl=$("$DAGGER" query -l error -f text -d "react" www.deployUrl) + echo "=>$deployUrl<=" + run curl -sS "$deployUrl" + assert_success + assert_output --partial "Todo App" }