net: Update test cookie expiration dates to one century in the future. (#44341)

These dates were chosen 10 years ago, which I'm sure felt like a
reasonably far-future date for a very young web engine. Surprise! We're
still here, so we can be more bold this time.

Testing: Unit tests stop failing.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews
2026-04-19 00:55:05 -04:00
committed by GitHub
parent 678f9d7a47
commit 19354a5b37

View File

@@ -423,7 +423,7 @@ fn test_cookie_eviction_expired() {
);
vec.push(st);
}
vec.push("foo=bar; Secure; expires=Sun, 18-Apr-2027 21:06:29 GMT".to_owned());
vec.push("foo=bar; Secure; expires=Sun, 18-Apr-2127 21:06:29 GMT".to_owned());
let r = add_retrieve_cookies(
"https://home.example.org:8888/cookie-parser?0001",
&vec,
@@ -437,13 +437,13 @@ fn test_cookie_eviction_all_secure_one_nonsecure() {
let mut vec = Vec::new();
for i in 1..5 {
let st = format!(
"extra{}=bar; Secure; expires=Sun, 18-Apr-2026 21:06:29 GMT",
"extra{}=bar; Secure; expires=Sun, 18-Apr-2126 21:06:29 GMT",
i
);
vec.push(st);
}
vec.push("foo=bar; expires=Sun, 18-Apr-2026 21:06:29 GMT".to_owned());
vec.push("foo2=bar; Secure; expires=Sun, 18-Apr-2028 21:06:29 GMT".to_owned());
vec.push("foo=bar; expires=Sun, 18-Apr-2126 21:06:29 GMT".to_owned());
vec.push("foo2=bar; Secure; expires=Sun, 18-Apr-2128 21:06:29 GMT".to_owned());
let r = add_retrieve_cookies(
"https://home.example.org:8888/cookie-parser?0001",
&vec,
@@ -460,12 +460,12 @@ fn test_cookie_eviction_all_secure_new_nonsecure() {
let mut vec = Vec::new();
for i in 1..6 {
let st = format!(
"extra{}=bar; Secure; expires=Sun, 18-Apr-2026 21:06:29 GMT",
"extra{}=bar; Secure; expires=Sun, 18-Apr-2126 21:06:29 GMT",
i
);
vec.push(st);
}
vec.push("foo=bar; expires=Sun, 18-Apr-2077 21:06:29 GMT".to_owned());
vec.push("foo=bar; expires=Sun, 18-Apr-2177 21:06:29 GMT".to_owned());
let r = add_retrieve_cookies(
"https://home.example.org:8888/cookie-parser?0001",
&vec,
@@ -481,10 +481,10 @@ fn test_cookie_eviction_all_secure_new_nonsecure() {
fn test_cookie_eviction_all_nonsecure_new_secure() {
let mut vec = Vec::new();
for i in 1..6 {
let st = format!("extra{}=bar; expires=Sun, 18-Apr-2026 21:06:29 GMT", i);
let st = format!("extra{}=bar; expires=Sun, 18-Apr-2126 21:06:29 GMT", i);
vec.push(st);
}
vec.push("foo=bar; Secure; expires=Sun, 18-Apr-2077 21:06:29 GMT".to_owned());
vec.push("foo=bar; Secure; expires=Sun, 18-Apr-2177 21:06:29 GMT".to_owned());
let r = add_retrieve_cookies(
"https://home.example.org:8888/cookie-parser?0001",
&vec,
@@ -500,10 +500,10 @@ fn test_cookie_eviction_all_nonsecure_new_secure() {
fn test_cookie_eviction_all_nonsecure_new_nonsecure() {
let mut vec = Vec::new();
for i in 1..6 {
let st = format!("extra{}=bar; expires=Sun, 18-Apr-2026 21:06:29 GMT", i);
let st = format!("extra{}=bar; expires=Sun, 18-Apr-2126 21:06:29 GMT", i);
vec.push(st);
}
vec.push("foo=bar; expires=Sun, 18-Apr-2077 21:06:29 GMT".to_owned());
vec.push("foo=bar; expires=Sun, 18-Apr-2177 21:06:29 GMT".to_owned());
let r = add_retrieve_cookies(
"https://home.example.org:8888/cookie-parser?0001",
&vec,