tests: examples/react tests to use native secrets

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-05-28 13:33:59 -07:00
parent 28fd9c341f
commit 1e1b28e1de
4 changed files with 32 additions and 40 deletions

View File

@@ -5,15 +5,13 @@ setup() {
}
@test "example: react" {
skip_unless_secrets_available "$TESTDIR"/examples/react/inputs.yaml
cp -R "$TESTDIR"/examples/react/.dagger "$DAGGER_WORKSPACE"/.dagger
cp -R "$TESTDIR"/../examples/react/*.cue "$DAGGER_WORKSPACE"/.dagger/env/default/plan
"$DAGGER" init
dagger_new_with_plan react "$TESTDIR"/../examples/react
sops -d "$TESTDIR"/examples/react/inputs.yaml | "$DAGGER" -e "react" input yaml "" -f -
"$DAGGER" up -e "react"
"$DAGGER" up
# curl the URL we just deployed to check if it worked
deployUrl=$("$DAGGER" query -l error -f text -e "react" www.deployUrl)
deployUrl=$("$DAGGER" query -l error -f text www.deployUrl)
run curl -sS "$deployUrl"
assert_success
assert_output --partial "Todo App"