This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/tests/examples.bats
Andrea Luzzardi 1ac0041c53 test: react example: use dagger up instead of compute
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
2021-04-15 15:09:39 -07:00

21 lines
582 B
Bash

setup() {
load 'helpers'
common_setup
}
@test "example: react" {
skip_unless_secrets_available "$TESTDIR"/examples/react/inputs.yaml
"$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"
}