From 8d344a63126bd848fba13c93496d925317fcf4c3 Mon Sep 17 00:00:00 2001 From: Raphael Taylor-Davies <1781103+tustvold@users.noreply.github.com> Date: Fri, 29 Mar 2024 07:58:18 +0000 Subject: [PATCH] Update error message tests (#5569) --- object_store/src/aws/builder.rs | 5 +---- object_store/src/client/retry.rs | 4 ++-- object_store/src/gcp/builder.rs | 5 +---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/object_store/src/aws/builder.rs b/object_store/src/aws/builder.rs index a578d1abbfae..664e18364600 100644 --- a/object_store/src/aws/builder.rs +++ b/object_store/src/aws/builder.rs @@ -1333,10 +1333,7 @@ mod tests { .unwrap_err() .to_string(); - assert_eq!( - "Generic HTTP client error: builder error: unknown proxy scheme", - err - ); + assert_eq!("Generic HTTP client error: builder error", err); } #[test] diff --git a/object_store/src/client/retry.rs b/object_store/src/client/retry.rs index c4f52989a52c..e4bb5c9e731a 100644 --- a/object_store/src/client/retry.rs +++ b/object_store/src/client/retry.rs @@ -425,7 +425,7 @@ mod tests { } let e = do_request().await.unwrap_err().to_string(); - assert!(e.ends_with("too many redirects"), "{}", e); + assert!(e.contains("error following redirect for url"), "{}", e); // Handles redirect missing location mock.push( @@ -489,7 +489,7 @@ mod tests { let res = client.request(Method::PUT, mock.url()).send_retry(&retry); let e = res.await.unwrap_err().to_string(); assert!( - e.contains("Error after 0 retries in") && e.contains("operation timed out"), + e.contains("Error after 0 retries in") && e.contains("error sending request for url"), "{e}" ); diff --git a/object_store/src/gcp/builder.rs b/object_store/src/gcp/builder.rs index 14c4257dc6a3..2cf75040b858 100644 --- a/object_store/src/gcp/builder.rs +++ b/object_store/src/gcp/builder.rs @@ -594,10 +594,7 @@ mod tests { .unwrap_err() .to_string(); - assert_eq!( - "Generic HTTP client error: builder error: unknown proxy scheme", - err - ); + assert_eq!("Generic HTTP client error: builder error", err); } #[test]