@@ -95,28 +95,31 @@ do_test_deploy() {
95
95
# The backend will timeout pg connections after 5 minutes, which will
96
96
# result in an EPIPE error in the services when they attempt to use the
97
97
# dead connection. The inspec tests can't handle this and don't have an
98
- # easy retry mechanism, so we restart the frontends before running tests.
98
+ # easy retry mechanism, so we create some throwaway tokens to work through
99
+ # busted connections.
99
100
# Note that this disconnection isn't caused by automate-pg-gateway, which
100
101
# we have tuned to be more tolerant of idle connections.
101
102
# See also:
102
103
# * https://github.com/lib/pq/issues/870
103
104
# * https://github.com/lib/pq/pull/871
104
105
# * https://github.com/lib/pq/issues/939
105
- docker exec -t " $_frontend1_container_name " " $cli_bin " restart-services
106
- docker exec -t " $_frontend2_container_name " " $cli_bin " restart-services
106
+ docker exec -t " $_frontend1_container_name " " $cli_bin " iam token create --admin " $( date +%s) " || true
107
+ docker exec -t " $_frontend1_container_name " " $cli_bin " iam token create --admin " $( date +%s) " || true
108
+ docker exec -t " $_frontend2_container_name " " $cli_bin " iam token create --admin " $( date +%s) " || true
109
+ docker exec -t " $_frontend2_container_name " " $cli_bin " iam token create --admin " $( date +%s) " || true
107
110
108
- run_inspec_tests " ${A2_ROOT_DIR} " " a2-iam-v2-integration"
109
111
local admin_token
110
112
admin_token=$( docker exec -t " $_frontend1_container_name " \
111
113
" $cli_bin " iam token create --admin " diagnostics-test-$RANDOM " )
112
114
113
115
docker exec -t " $_frontend1_container_name " \
114
116
" $cli_bin " diagnostics run --admin-token " $admin_token " " ~iam-v1" " ~applications"
115
117
116
-
117
118
docker exec -t " $_frontend2_container_name " \
118
119
" $cli_bin " diagnostics run --admin-token " $admin_token " " ~iam-v1" " ~applications"
119
120
121
+ run_inspec_tests " ${A2_ROOT_DIR} " " a2-iam-v2-integration"
122
+
120
123
" $cli_bin " diagnostics run --admin-token " $admin_token " " ~iam-v1" " ~purge" " ~cli" " ~grpc" " ~deployment" " ~applications"
121
124
122
125
}
0 commit comments