mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-29 14:41:09 +01:00
dont reuse err on multiple goroutines (#4545)
This commit is contained in:
parent
39f2d66eb7
commit
20c6a57d68
@ -44,7 +44,7 @@ func TestHandler_XForwardedFor(t *testing.T) {
|
|||||||
client := cluster.Cores[0].Client
|
client := cluster.Cores[0].Client
|
||||||
|
|
||||||
req := client.NewRequest("GET", "/")
|
req := client.NewRequest("GET", "/")
|
||||||
_, err = client.RawRequest(req)
|
_, err := client.RawRequest(req)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("expected error")
|
t.Fatal("expected error")
|
||||||
}
|
}
|
||||||
@ -128,7 +128,7 @@ func TestHandler_XForwardedFor(t *testing.T) {
|
|||||||
req := client.NewRequest("GET", "/")
|
req := client.NewRequest("GET", "/")
|
||||||
req.Headers = make(http.Header)
|
req.Headers = make(http.Header)
|
||||||
req.Headers.Set("x-forwarded-for", "5.6.7.8")
|
req.Headers.Set("x-forwarded-for", "5.6.7.8")
|
||||||
_, err = client.RawRequest(req)
|
_, err := client.RawRequest(req)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("expected error")
|
t.Fatal("expected error")
|
||||||
}
|
}
|
||||||
@ -162,7 +162,7 @@ func TestHandler_XForwardedFor(t *testing.T) {
|
|||||||
req := client.NewRequest("GET", "/")
|
req := client.NewRequest("GET", "/")
|
||||||
req.Headers = make(http.Header)
|
req.Headers = make(http.Header)
|
||||||
req.Headers.Set("x-forwarded-for", "2.3.4.5,3.4.5.6")
|
req.Headers.Set("x-forwarded-for", "2.3.4.5,3.4.5.6")
|
||||||
_, err = client.RawRequest(req)
|
_, err := client.RawRequest(req)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("expected error")
|
t.Fatal("expected error")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user