fail rest of bats file on first test failure

This commit is contained in:
Michael Hobbs
2016-08-25 09:17:26 -07:00
parent 4e4c8cebc4
commit e23e491967
24 changed files with 66 additions and 0 deletions

View File

@@ -11,6 +11,17 @@ PLUGIN_CORE_AVAILABLE_PATH=${PLUGIN_CORE_AVAILABLE_PATH:="$PLUGIN_CORE_PATH/avai
CUSTOM_TEMPLATE_SSL_DOMAIN=customssltemplate.dokku.me
UUID=$(tr -dc 'a-z0-9' < /dev/urandom | fold -w 32 | head -n 1)
TEST_APP="rdmtestapp-${UUID}"
SKIPPED_TEST_ERR_MSG="previous test failed! skipping remaining tests..."
# global setup() and teardown()
# skips remaining tests on first failure
global_setup() {
[[ ! -f "${BATS_PARENT_TMPNAME}.skip" ]] || skip "$SKIPPED_TEST_ERR_MSG"
}
global_teardown() {
[[ -n "$BATS_TEST_COMPLETED" ]] || touch "${BATS_PARENT_TMPNAME}.skip"
}
# test functions
flunk() {