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.
This commit is contained in:
Anthony Ramine 2023-03-27 13:07:23 +02:00
parent 7215070e22
commit 6d61bf2adb
1 changed files with 1 additions and 2 deletions

View File

@ -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() {}
}