tests: add assertions to various bats tests
Missing these assertions didn't necessarily break tests but they are more correct and having them should help suss out bugs.
This commit is contained in:
1 parent
69e56fc976
commit
622548057c
37 files changed
+623
-144
No files matched your search
@@ -29,8 +29,15 @@ teardown() {
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) proxy:build-config (domains:disable/enable)" {
|
||||
deploy_app
|
||||
dokku domains:disable $TEST_APP
|
||||
run deploy_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku domains:disable $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
HOSTNAME=$(<"$DOKKU_ROOT/VHOST")
|
||||
check_urls http://${HOSTNAME}:[0-9]+
|
||||
@@ -40,19 +47,29 @@ teardown() {
|
||||
assert_http_success $URL
|
||||
done
|
||||
|
||||
dokku domains:enable $TEST_APP
|
||||
run /bin/bash -c "dokku domains:enable $TEST_APP"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
check_urls http://${TEST_APP}.dokku.me
|
||||
assert_http_success http://${TEST_APP}.dokku.me
|
||||
}
|
||||
|
||||
@test "(nginx-vhosts) proxy:build-config (domains:add pre deploy)" {
|
||||
create_app
|
||||
run create_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
run /bin/bash -c "dokku domains:add $TEST_APP www.test.app.dokku.me"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
deploy_app
|
||||
run deploy_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
sleep 5 # wait for nginx to reload
|
||||
|
||||
check_urls http://www.test.app.dokku.me
|
||||
@@ -61,7 +78,10 @@ teardown() {
|
||||
|
||||
@test "(nginx-vhosts) proxy:build-config (with global VHOST)" {
|
||||
echo "dokku.me" >"$DOKKU_ROOT/VHOST"
|
||||
deploy_app
|
||||
run deploy_app
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
|
||||
check_urls http://${TEST_APP}.dokku.me
|
||||
assert_http_success http://${TEST_APP}.dokku.me
|
||||
|
||||
Reference in new issue
Block a user