Merge pull request #333 from dagger/examples-react-test

test: react example: use dagger up instead of compute
This commit is contained in:
Andrea Luzzardi 2021-04-15 15:42:26 -07:00 committed by GitHub
commit 54ba2a2688
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,10 +7,14 @@ setup() {
@test "example: react" {
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"
"$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"
}