mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Merge pull request #111885 from p0lyn0mial/apiserver-integration-rsp-body
integration: TestCacheControl and TestHSTS close the ResponseBody
This commit is contained in:
commit
00191af94b
@ -246,6 +246,7 @@ func TestCacheControl(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
cc := resp.Header.Get("Cache-Control")
|
||||
if !strings.Contains(cc, "private") {
|
||||
t.Errorf("expected private cache-control, got %q", cc)
|
||||
@ -291,6 +292,7 @@ func TestHSTS(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
cc := resp.Header.Get("Strict-Transport-Security")
|
||||
if !strings.Contains(cc, "max-age=31536000; includeSubDomains") {
|
||||
t.Errorf("expected max-age=31536000; includeSubDomains, got %q", cc)
|
||||
|
Loading…
Reference in New Issue
Block a user