Skip to content

Commit

Permalink
bug-1894282: Support gcp stage in systemtest
Browse files Browse the repository at this point in the history
  • Loading branch information
relud committed Apr 30, 2024
1 parent d1d6a39 commit eb76ead
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
21 changes: 14 additions & 7 deletions systemtest/test_content_length.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,23 @@ def test_content_length_1000(self, posturl, crash_generator, nginx):
with http_post(posturl, headers, payload) as resp:
status_code = resp.getcode()
except RemoteDisconnected:
# If there's an ELB and nginx times out waiting for the rest of the
# request, then we get an HTTP 504. If there's no ELB (we're
# connecting directly to nginx), then nginx just drops the
# connection and we get back a RemoteDisconnected error.
status_code = 504
# If there's no LB (we're connecting directly to nginx), then nginx
# may drop the connection and we get back a RemoteDisconnected error
status_code = None

# Verify we get an HTTP 504 because something timed out waiting for the
# Verify we get an error because something timed out waiting for the
# HTTP client (us) to send the rest of the data which is expected
# because we sent a bad content-length
assert status_code == 504
assert status_code in (
# without LB, nginx drops the connection
None,
# with LB in GCP if nginx drops the connection we get 502, or if LB
# times out first we get 408. clients might not retry a 4XX error
# like they will a 5XX, so we don't accept a 408 here.
502,
# with LB in AWS if nginx drops the connection we get 504
504,
)

def test_content_length_non_int(self, posturl, crash_generator):
"""Post a crash with a content-length that isn't an int"""
Expand Down
6 changes: 6 additions & 0 deletions systemtest/test_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ case $1 in
export HOST=http://web:8000/
;;
"stage")
"aws-stage")
export NGINX_TESTS=1
export POST_CHECK=0
export HOST=https://crash-reports.allizom.org/
;;
"gcp-stage")
export NGINX_TESTS=1
export POST_CHECK=0
export HOST=http://antenna-stage.socorro.nonprod.webservices.mozgcp.net/
;;
*)
echo "${USAGE}"
exit 1;
Expand Down

0 comments on commit eb76ead

Please sign in to comment.