@@ -1173,7 +1173,7 @@ wait_for_ready_deployment() {
11731173# results, after deploy_stackrox has returned.
11741174# Requires: API_ENDPOINT, ROX_ADMIN_PASSWORD (both set by wait_for_api).
11751175wait_for_scanner_v4_vuln_load () {
1176- local max_seconds=" ${SCANNER_V4_VULN_LOAD_TIMEOUT:- 1200 } "
1176+ local max_seconds=" ${SCANNER_V4_VULN_LOAD_TIMEOUT:- 2400 } "
11771177 info " Waiting for Scanner V4 to finish loading vulnerabilities..."
11781178
11791179 require_environment " API_ENDPOINT"
@@ -1183,16 +1183,15 @@ wait_for_scanner_v4_vuln_load() {
11831183 start_time=" $( date ' +%s' ) "
11841184 while true ; do
11851185 # -w '\n%{http_code}' appends a newline and the HTTP status code after the
1186- # response body, letting us capture both in a single variable without a
1187- # temp file. ##*$'\n' strips up to and including the last newline (leaving
1188- # just the 3-digit code); %$'\n'* strips the trailing newline+code (leaving
1189- # just the body).
1186+ # response body, letting us capture both in a single variable.
11901187 local response http_code body
11911188 response=$( curl -sk \
11921189 --config <( curl_cfg user " admin:${ROX_ADMIN_PASSWORD} " ) \
11931190 -w ' \n%{http_code}' \
11941191 " https://${API_ENDPOINT} /v1/integrationhealth/vulndefinitions?component=SCANNER_V4" )
1192+ # ##*$'\n' strips up to and including the last newline (leaving just the 3-digit code).
11951193 http_code=" ${response##* $' \n ' } "
1194+ # %$'\n'* strips the trailing newline+code (leaving just the body).
11961195 body=" ${response% $' \n ' * } "
11971196
11981197 elapsed=$(( $(date '+% s') - start_time ))
0 commit comments