diff --git a/tests/lifecycle/bats/required-stack-destructive.bats b/tests/lifecycle/bats/required-stack-destructive.bats index 9d89c113..92945639 100755 --- a/tests/lifecycle/bats/required-stack-destructive.bats +++ b/tests/lifecycle/bats/required-stack-destructive.bats @@ -24,6 +24,12 @@ installed_required_containers() { for c in "${required_containers[@]}"; do container_installed "$c" && echo "$c" done + # Always succeed — under `set -e`, the function's own exit code is that of + # its last statement, so if the last array entry happens to be a container + # NOT installed on this node, the whole function (and any bare + # `x="$(installed_required_containers)"` caller) would spuriously fail even + # though earlier entries matched fine. + return 0 } wait_running() { diff --git a/tests/lifecycle/bats/required-stack.bats b/tests/lifecycle/bats/required-stack.bats index f05f3880..9fa04a86 100644 --- a/tests/lifecycle/bats/required-stack.bats +++ b/tests/lifecycle/bats/required-stack.bats @@ -56,6 +56,8 @@ installed_required_containers() { for c in "${required_containers[@]}"; do container_installed "$c" && echo "$c" done + # Always succeed — see the identical comment in required-stack-destructive.bats. + return 0 } bitcoin_rpc() {