From a27647d981077efb5ce26e407207fe19c2bd62a8 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Thu, 9 Jan 2025 15:25:38 -0800 Subject: [PATCH] make test agnostic about exact network failure reason. Co-authored-by: Weihang Lo --- tests/testsuite/bad_config.rs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/tests/testsuite/bad_config.rs b/tests/testsuite/bad_config.rs index 7b482b90779..dca1d77afa4 100644 --- a/tests/testsuite/bad_config.rs +++ b/tests/testsuite/bad_config.rs @@ -2175,9 +2175,7 @@ fn github_pull_request_url() { .with_stderr_data(str![[r#" [WARNING] dependency (bar) git url https://github.com/foo/bar/pull/123 is not a repository. The path looks like a pull request. Try replacing the dependency with: `git = "https://github.com/foo/bar.git" rev = "refs/pull/123/head"` in the dependency declaration. [UPDATING] git repository `https://github.com/foo/bar/pull/123` -[WARNING] spurious network error (3 tries remaining): unexpected http status code: 404; class=Http (34) -[WARNING] spurious network error (2 tries remaining): unexpected http status code: 404; class=Http (34) -[WARNING] spurious network error (1 tries remaining): unexpected http status code: 404; class=Http (34) +... [ERROR] failed to get `bar` as a dependency of package `foo v0.0.0 ([ROOT]/foo)` Caused by: @@ -2185,17 +2183,7 @@ Caused by: Caused by: Unable to update https://github.com/foo/bar/pull/123 - -Caused by: - failed to clone into: [ROOT]/home/.cargo/git/db/123-[HASH] - -Caused by: - network failure seems to have happened - if a proxy or similar is necessary `net.git-fetch-with-cli` may help here - https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli - -Caused by: - unexpected http status code: 404; class=Http (34) +... "#]]) .run();