Skip to content

Commit ef29942

Browse files
committed
Fix tests
1 parent 95f7b9d commit ef29942

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/auth/authenticator_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ func Test_generateResponse(t *testing.T) {
766766
expectedResponse = &Response{
767767
Allow: false,
768768
Response: http.Response{
769-
StatusCode: http.StatusInternalServerError,
769+
StatusCode: http.StatusServiceUnavailable,
770770
Header: http.Header{
771771
ExternalAuthHandlerHeader: {"cerberus"},
772772
CerberusHeaderReasonHeader: {"upstream-auth-service-is-overloaded"},
@@ -977,8 +977,9 @@ func TestSetupUpstreamAuthRequest(t *testing.T) {
977977

978978
expectedReq, _ := http.NewRequest("GET", "http://example.com", nil)
979979
expectedReq.Header = http.Header{
980-
"X-Token-Write": {"value"},
981-
"Content-Type": {"application/json"},
980+
"X-Token-Write": {"value"},
981+
"X-Service-Name": []string{"cerberus"},
982+
"Content-Type": {"application/json"},
982983
}
983984

984985
actualReq, actualErr := setupUpstreamAuthRequest(upstreamAuth, request)

0 commit comments

Comments
 (0)