From 2b6df280de60c0bb70014e9b03885ef76fde4c61 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 30 Aug 2022 16:41:09 +0200 Subject: [PATCH] node: fix regression in TestJWT (#25635) --- node/rpcstack_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node/rpcstack_test.go b/node/rpcstack_test.go index 09acf7ea0458..ebc253800623 100644 --- a/node/rpcstack_test.go +++ b/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) } }