node: fix regression in TestJWT (#25635)

pull/25213/head
Felix Lange 2 years ago committed by GitHub
parent 7813b675f5
commit 2b6df280de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      node/rpcstack_test.go

@ -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)
}
}

Loading…
Cancel
Save