Skip to content

Commit

Permalink
Update error message tests (#5569)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold authored Mar 29, 2024
1 parent f8acd2b commit 8d344a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
5 changes: 1 addition & 4 deletions object_store/src/aws/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions object_store/src/client/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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}"
);

Expand Down
5 changes: 1 addition & 4 deletions object_store/src/gcp/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 8d344a6

Please sign in to comment.