lib/promauth: follow-up b577413d3b

Convert test result expectations to canonical form.
Starting from b577413d3b specified header keys are forced
into canonical form https://pkg.go.dev/net/http#CanonicalHeaderKey

Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit e6dd52b04c)
This commit is contained in:
hagen1778 2024-03-18 11:12:45 +01:00
parent 9fcd34287b
commit c0659800d5
No known key found for this signature in database
GPG key ID: 3BF75F3741CA9640

View file

@ -538,8 +538,8 @@ func TestParseHeadersSuccess(t *testing.T) {
}
}
f(nil)
f([]string{"foo: bar"})
f([]string{"Foo: bar", "A-b-c: d-e-f"})
f([]string{"Foo: bar"})
f([]string{"Foo: bar", "A-B-C: d-e-f"})
}
func TestParseHeadersFailure(t *testing.T) {
@ -590,6 +590,6 @@ func TestConfigHeaders(t *testing.T) {
}
}
f(nil, "")
f([]string{"foo: bar"}, "foo: bar\r\n")
f([]string{"foo: bar"}, "Foo: bar\r\n")
f([]string{"Foo-Bar: Baz s:sdf", "A:b", "X-Forwarded-For: A-B:c"}, "Foo-Bar: Baz s:sdf\r\nA: b\r\nX-Forwarded-For: A-B:c\r\n")
}