Skip to content

Commit baa6c3a

Browse files
committed
test: relax redaction for running ssh
`ssh` binary is not available on some platforms. https://github.com/rust-lang-ci/rust/actions/runs/9814397548/job/27101968836#step:25:10940 ``` ---- git_auth::net_err_suggests_fetch_with_cli stdout ---- running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/cargo check -v` running `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/cargo check -v` thread 'git_auth::net_err_suggests_fetch_with_cli' panicked at tests/testsuite/git_auth.rs:439:10: ---- expected: tests/testsuite/git_auth.rs:415:27 ++++ actual: stderr 1 1 | [UPDATING] git repository `ssh://needs-proxy.invalid/git` 2 2 | [RUNNING] `git fetch --verbose --force --update-head-ok [..]ssh://needs-proxy.invalid/git[..] [..]+HEAD:refs/remotes/origin/HEAD[..]` 3 - ssh: Could not resolve hostname needs-proxy.invalid: [..] not known 4 - fatal: Could not read from remote repository. 5 - 6 - Please make sure you have the correct access rights 7 - and the repository exists. 3 + [ERROR] cannot run ssh: No such file or directory 4 + fatal: unable to fork 8 5 | [ERROR] failed to get `foo` as a dependency of package `foo v0.0.0 ([ROOT]/foo)` 9 6 | 10 7 | Caused by: 11 8 | failed to load source for dependency `foo` 12 9 | ⋮ 15 12 | 16 13 | Caused by: 17 14 | failed to fetch into: [ROOT]/home/.cargo/git/db/git-[HASH] 18 15 | 19 16 | Caused by: 20 - process didn't exit successfully: `git fetch --verbose --force --update-head-ok [..]ssh://needs-proxy.invalid/git[..] [..]+HEAD:refs/remotes/origin/HEAD[..]` ([EXIT_STATUS]: 128) 17 + process didn't exit successfully: `git fetch --verbose --force --update-head-ok 'ssh://needs-proxy.invalid/git' '+HEAD:refs/remotes/origin/HEAD'` ([EXIT_STATUS]: 128) ```
1 parent 2b27914 commit baa6c3a

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

tests/testsuite/git_auth.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -412,29 +412,7 @@ Caused by:
412412

413413
p.cargo("check -v")
414414
.with_status(101)
415-
.with_stderr_data(str![[r#"
416-
[UPDATING] git repository `ssh://needs-proxy.invalid/git`
417-
[RUNNING] `git fetch --verbose --force --update-head-ok [..]ssh://needs-proxy.invalid/git[..] [..]+HEAD:refs/remotes/origin/HEAD[..]`
418-
ssh: Could not resolve hostname needs-proxy.invalid: [..] not known
419-
fatal: Could not read from remote repository.
420-
421-
Please make sure you have the correct access rights
422-
and the repository exists.
423-
[ERROR] failed to get `foo` as a dependency of package `foo v0.0.0 ([ROOT]/foo)`
424-
425-
Caused by:
426-
failed to load source for dependency `foo`
427-
428-
Caused by:
429-
Unable to update ssh://needs-proxy.invalid/git
430-
431-
Caused by:
432-
failed to fetch into: [ROOT]/home/.cargo/git/db/git-[HASH]
433-
434-
Caused by:
435-
process didn't exit successfully: `git fetch --verbose --force --update-head-ok [..]ssh://needs-proxy.invalid/git[..] [..]+HEAD:refs/remotes/origin/HEAD[..]` ([EXIT_STATUS]: 128)
436-
437-
"#]])
415+
.with_stderr_contains("[..]Unable to update[..]")
438416
.with_stderr_does_not_contain("[..]try enabling `git-fetch-with-cli`[..]")
439417
.run();
440418
}

0 commit comments

Comments
 (0)