From f9008d7c93b54e250835fbc9577a87ef92295c2d Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Thu, 9 May 2024 23:32:30 +1000 Subject: [PATCH] Fix testing Signed-off-by: Jiahao XU --- crates/binstalk-git-repo-api/src/gh_api_client.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/binstalk-git-repo-api/src/gh_api_client.rs b/crates/binstalk-git-repo-api/src/gh_api_client.rs index 2063541b..69e2ea38 100644 --- a/crates/binstalk-git-repo-api/src/gh_api_client.rs +++ b/crates/binstalk-git-repo-api/src/gh_api_client.rs @@ -387,11 +387,13 @@ mod test { release, artifact_name: "1234".to_compact_string(), }) - .await - .unwrap_err(); + .await; assert!( - matches!(err, GhApiError::NotFound | GhApiError::RateLimit { .. }), + matches!( + err, + Ok(None) | Err(GhApiError::NotFound | GhApiError::RateLimit { .. }) + ), "err = {:#?}", err );