From 6d61bf2adb6710976b53123e6450822e464875dd Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 27 Mar 2023 13:07:23 +0200 Subject: [PATCH] Fix google test Sometimes google replies with 302 to redirect to another Google website with a country-specific TLD. We don't actually care which status code is returned, just that we successfully connect to google.com with the HTTPS connector. --- hyper-boring/src/test.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hyper-boring/src/test.rs b/hyper-boring/src/test.rs index 39b96e34..226a0487 100644 --- a/hyper-boring/src/test.rs +++ b/hyper-boring/src/test.rs @@ -19,8 +19,7 @@ async fn google() { let resp = client .get("https://www.google.com".parse().unwrap()) .await - .unwrap(); - assert!(resp.status().is_success(), "{}", resp.status()); + .expect("connection should succeed"); let mut body = resp.into_body(); while body.next().await.transpose().unwrap().is_some() {} }