tests: convert react example test to bats

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-04-14 17:19:27 -07:00
parent 876ff7d4d6
commit fb2e140b91
3 changed files with 16 additions and 15 deletions

16
tests/examples.bats Normal file
View File

@@ -0,0 +1,16 @@
setup() {
load 'helpers'
common_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"
assert_success
assert_output --partial "Todo App"
}