Skip to content

Commit e31dd45

Browse files
committed
fixup test status code
1 parent 4a87dc0 commit e31dd45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/externalauth_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ func TestExternalAuthCallback(t *testing.T) {
556556
// If the validation URL gives a non-OK status code, this
557557
// should be treated as an internal server error.
558558
srv.Config.Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
559-
w.WriteHeader(http.StatusForbidden)
559+
w.WriteHeader(http.StatusBadRequest)
560560
w.Write([]byte("Something went wrong!"))
561561
})
562562
_, err = agentClient.ExternalAuth(ctx, agentsdk.ExternalAuthRequest{
@@ -565,7 +565,7 @@ func TestExternalAuthCallback(t *testing.T) {
565565
var apiError *codersdk.Error
566566
require.ErrorAs(t, err, &apiError)
567567
require.Equal(t, http.StatusInternalServerError, apiError.StatusCode())
568-
require.Equal(t, "validate external auth token: status 403: body: Something went wrong!", apiError.Detail)
568+
require.Equal(t, "validate external auth token: status 400: body: Something went wrong!", apiError.Detail)
569569
})
570570

571571
t.Run("ExpiredNoRefresh", func(t *testing.T) {

0 commit comments

Comments
 (0)