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
2023-07-31 13:08:16 -04:00
parent 69e56fc976
commit 622548057c
37 changed files with 623 additions and 144 deletions

View File

@@ -16,7 +16,10 @@ teardown() {
}
@test "(core) remove exited containers" {
deploy_app
run deploy_app
echo "output: $output"
echo "status: $status"
assert_success
# make sure we have many exited containers of the same 'type'
run /bin/bash -c "for cnt in 1 2 3; do dokku run $TEST_APP echo $TEST_APP; done"
@@ -89,7 +92,11 @@ EOF
CID=$(<"$DOKKU_ROOT/$TEST_APP/CONTAINER.web.1")
docker commit --change "ENV USER postgres" "$CID" "dokku/${TEST_APP}:latest"
dokku config:set --no-restart "$TEST_APP" DOKKU_APP_USER=postgres
run /bin/bash -c "dokku config:set --no-restart $TEST_APP DOKKU_APP_USER=postgres"
echo "output: $output"
echo "status: $status"
assert_success
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_CORE_AVAILABLE_PATH/config/functions"