Skip to content

Commit 0e7ecc8

Browse files
committed
workaround inspec tests not handling 500s from stale db conns
Signed-off-by: Daniel DeLeo <dan@chef.io>
1 parent e906147 commit 0e7ecc8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

integration/tests/cluster.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,13 @@ do_test_deploy() {
9292
export ELASTICSEARCH_URL="http://$frontend1_ip:10144"
9393
test_notifications_endpoint="http://$test_container_ip:15555"
9494

95-
run_inspec_tests "${A2_ROOT_DIR}" "a2-iam-v2-integration"
95+
# Inspec tests are less tolerant of transient 500s; we expect a few of
96+
# those as bad postgres connections get purged from the various services.
97+
# Restart everything before running the tests
98+
docker exec -t "$_frontend1_container_name" "$cli_bin" restart-services
99+
docker exec -t "$_frontend2_container_name" "$cli_bin" restart-services
96100

101+
run_inspec_tests "${A2_ROOT_DIR}" "a2-iam-v2-integration"
97102
local admin_token
98103
admin_token=$(docker exec -t "$_frontend1_container_name" \
99104
"$cli_bin" iam token create --admin "diagnostics-test-$RANDOM")
@@ -106,4 +111,5 @@ do_test_deploy() {
106111
"$cli_bin" diagnostics run --admin-token "$admin_token" "~iam-v1" "~applications"
107112

108113
"$cli_bin" diagnostics run --admin-token "$admin_token" "~iam-v1" "~purge" "~cli" "~grpc" "~deployment" "~applications"
114+
109115
}

0 commit comments

Comments
 (0)