diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go index 6325ba7a..7e68ca57 100644 --- a/tests/integration/integration_test.go +++ b/tests/integration/integration_test.go @@ -174,7 +174,7 @@ func TestRetryMiddleware(t *testing.T) { "max retries - fails": { serverCodes: []int{http.StatusServiceUnavailable, http.StatusServiceUnavailable, http.StatusServiceUnavailable, http.StatusBadGateway}, expResultCode: http.StatusBadGateway, - expResultBody: "{\"error\":\"Bad Gateway\"}\n", // note the linebreak + expResultBody: "502", expBackendHits: 4, }, "non retryable error code": { @@ -196,6 +196,13 @@ func TestRetryMiddleware(t *testing.T) { expResultBody: "200", expBackendHits: 1, }, + "503 with model header": { + serverCodes: []int{http.StatusServiceUnavailable, http.StatusServiceUnavailable, http.StatusServiceUnavailable, http.StatusServiceUnavailable}, + header: []tuple{{k: "X-Model", v: modelName}}, + expResultCode: http.StatusServiceUnavailable, + expResultBody: "503", + expBackendHits: 4, + }, } for name, spec := range specs { t.Run(name, func(t *testing.T) {