Skip to content

Commit 03d97e4

Browse files
joshkaweihanglo
authored andcommitted
make test agnostic about exact network failure reason.
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
1 parent 22c647c commit 03d97e4

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

tests/testsuite/bad_config.rs

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,27 +2283,15 @@ fn github_pull_request_url() {
22832283
.with_stderr_data(str![[r#"
22842284
[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.
22852285
[UPDATING] git repository `https://github.com/foo/bar/pull/123`
2286-
[WARNING] spurious network error (3 tries remaining): unexpected http status code: 404; class=Http (34)
2287-
[WARNING] spurious network error (2 tries remaining): unexpected http status code: 404; class=Http (34)
2288-
[WARNING] spurious network error (1 tries remaining): unexpected http status code: 404; class=Http (34)
2286+
...
22892287
[ERROR] failed to get `bar` as a dependency of package `foo v0.0.0 ([ROOT]/foo)`
22902288
22912289
Caused by:
22922290
failed to load source for dependency `bar`
22932291
22942292
Caused by:
22952293
Unable to update https://github.com/foo/bar/pull/123
2296-
2297-
Caused by:
2298-
failed to clone into: [ROOT]/home/.cargo/git/db/123-[HASH]
2299-
2300-
Caused by:
2301-
network failure seems to have happened
2302-
if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
2303-
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
2304-
2305-
Caused by:
2306-
unexpected http status code: 404; class=Http (34)
2294+
...
23072295
23082296
"#]])
23092297
.run();

0 commit comments

Comments
 (0)