Skip to content

Commit

Permalink
make test agnostic about exact network failure reason.
Browse files Browse the repository at this point in the history
Co-authored-by: Weihang Lo <[email protected]>
  • Loading branch information
joshka and weihanglo authored Jan 9, 2025
1 parent 85c9387 commit a27647d
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions tests/testsuite/bad_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2175,27 +2175,15 @@ 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:
failed to load source for dependency `bar`
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();
Expand Down

0 comments on commit a27647d

Please sign in to comment.