test: react example: use dagger up instead of compute
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
14ca028918
commit
1ac0041c53
@ -5,12 +5,16 @@ setup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "example: react" {
|
@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
|
"$DAGGER" new --plan-dir "$TESTDIR"/../examples/react react
|
||||||
assert_success
|
sops -d "$TESTDIR"/examples/react/inputs.yaml | "$DAGGER" -d "react" input yaml "" -f -
|
||||||
url=$(echo "$output" | jq -r .www.deployUrl)
|
"$DAGGER" up -d "react"
|
||||||
run curl -sS "$url"
|
|
||||||
assert_success
|
# curl the URL we just deployed to check if it worked
|
||||||
assert_output --partial "Todo App"
|
deployUrl=$("$DAGGER" query -l error -f text -d "react" www.deployUrl)
|
||||||
|
echo "=>$deployUrl<="
|
||||||
|
run curl -sS "$deployUrl"
|
||||||
|
assert_success
|
||||||
|
assert_output --partial "Todo App"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user