Use second as cookie expires unit
This commit is contained in:
parent
41cc1121ea
commit
5febef5e69
1 changed files with 2 additions and 2 deletions
|
@ -219,8 +219,8 @@ var _ = framework.IngressNginxDescribe("Annotations - Affinity/Sticky Sessions",
|
|||
Expect(resp.StatusCode).Should(Equal(http.StatusOK))
|
||||
local, _ := time.LoadLocation("GMT")
|
||||
duration, _ := time.ParseDuration("48h")
|
||||
want := time.Date(1970, time.January, 1, 0, 0, 0, 0, local).Add(duration).Format("Mon, 02-Jan-06 15:04:05 MST")
|
||||
Expect(resp.Header.Get("Set-Cookie")).Should(ContainSubstring(fmt.Sprintf("Expires=%s", want)))
|
||||
expected := time.Date(1970, time.January, 1, 0, 0, 0, 0, local).Add(duration).Format("Mon, 02-Jan-06 15:04:05 MST")
|
||||
Expect(resp.Header.Get("Set-Cookie")).Should(ContainSubstring(fmt.Sprintf("Expires=%s", expected)))
|
||||
Expect(resp.Header.Get("Set-Cookie")).Should(ContainSubstring("Max-Age=259200"))
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue