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:
Jose Diaz-Gonzalez committed 2023-08-05 10:58:57 -04:00
1 parent 69e56fc976
commit 622548057c
37 files changed
+623 -144

No files matched your search

+13 -3
View File
@@ -27,8 +27,15 @@ teardown() {
}
@test "(ps) ps:inspect" {
dokku config:set "$TEST_APP" key=value key=value=value
deploy_app dockerfile
run /bin/bash -c "dokku config:set $TEST_APP key=value key=value=value"
echo "output: $output"
echo "status: $status"
assert_success
run deploy_app dockerfile
echo "output: $output"
echo "status: $status"
assert_success
CID=$(<$DOKKU_ROOT/$TEST_APP/CONTAINER.web.1)
run /bin/bash -c "dokku ps:inspect $TEST_APP"
@@ -113,7 +120,10 @@ EOF
echo "status: $status"
assert_output "$test_restart_policy"
deploy_app dockerfile
run deploy_app dockerfile
echo "output: $output"
echo "status: $status"
assert_success
CID=$(<$DOKKU_ROOT/$TEST_APP/CONTAINER.web.1)
run /bin/bash -c "docker inspect -f '{{ .HostConfig.RestartPolicy.Name }}:{{ .HostConfig.RestartPolicy.MaximumRetryCount }}' $CID"