Skip to content

Commit

Permalink
node: fix regression in TestJWT (#25635)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl authored Aug 30, 2022
1 parent 7813b67 commit 2b6df28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node/rpcstack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,10 @@ func TestJWT(t *testing.T) {
if err := wsRequest(t, wsUrl, "Authorization", token); err == nil {
t.Errorf("tc %d-ws, token '%v': expected not to allow, got ok", i, token)
}

token = tokenFn()
if resp := rpcRequest(t, htUrl, "Authorization", token); resp.StatusCode != 403 {
resp := rpcRequest(t, htUrl, "Authorization", token)
if resp.StatusCode != http.StatusUnauthorized {
t.Errorf("tc %d-http, token '%v': expected not to allow, got %v", i, token, resp.StatusCode)
}
}
Expand Down

0 comments on commit 2b6df28

Please sign in to comment.