Skip to content

Commit 1186059

Browse files
committed
test: Migrate git_auth to snapbox - gitoxide/macos fix
1 parent 792e301 commit 1186059

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

tests/testsuite/git_auth.rs

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Caused by:
241241
An IO error occurred when talking to the server
242242
243243
Caused by:
244-
[35] SSL connect error (schannel: failed to receive handshake, SSL/TLS connection failed)"
244+
[35] SSL connect error ([..])"
245245
} else if cfg!(windows) {
246246
r"\
247247
failed to send request: A connection with the server could not be established
@@ -250,7 +250,7 @@ Caused by:
250250
// macOS is difficult to tests as some builds may use Security.framework,
251251
// while others may use OpenSSL. In that case, let's just not verify the error
252252
// message here.
253-
"[..]"
253+
"..."
254254
} else {
255255
r" SSL [ERROR] syscall failure: ; class=Os (2)"
256256
}
@@ -302,10 +302,9 @@ fn ssh_something_happens() {
302302
// "[..]banner exchange: Connection to 127.0.0.1 [..]"
303303
// banner exchange: Connection to 127.0.0.1 port 62250: Software caused connection abort
304304
// But since there is no common meaningful sequence or word, we can only match a small telling sequence of characters.
305-
"onnect".to_string()
305+
"onnect"
306306
} else {
307-
format!(
308-
r"
307+
r"
309308
Caused by:
310309
failed to clone into: [ROOT]/home/.cargo/git/db/bar-[HASH]
311310
@@ -318,11 +317,7 @@ Caused by:
318317
An IO error occurred when talking to the server
319318
320319
Caused by:
321-
Connection closed by {} port {}
322-
",
323-
addr.ip(),
324-
addr.port()
325-
)
320+
[..]Connection closed by [..]"
326321
};
327322
format!(
328323
"\
@@ -393,9 +388,9 @@ fn net_err_suggests_fetch_with_cli() {
393388
.with_stderr_data(format!(
394389
"\
395390
[UPDATING] git repository `ssh://needs-proxy.invalid/git`
396-
[WARNING] spurious network error (3 tries remaining): failed to resolve address for needs-proxy.invalid: Name or service not known; class=Net (12)
397-
[WARNING] spurious network error (2 tries remaining): failed to resolve address for needs-proxy.invalid: Name or service not known; class=Net (12)
398-
[WARNING] spurious network error (1 tries remaining): failed to resolve address for needs-proxy.invalid: Name or service not known; class=Net (12)
391+
[WARNING] spurious network error (3 tries remaining): [..] resolve [..] needs-proxy.invalid: [..] not known[..]
392+
[WARNING] spurious network error (2 tries remaining): [..] resolve [..] needs-proxy.invalid: [..] not known[..]
393+
[WARNING] spurious network error (1 tries remaining): [..] resolve [..] needs-proxy.invalid: [..] not known[..]
399394
[ERROR] failed to get `foo` as a dependency of package `foo v0.0.0 ([ROOT]/foo)`
400395
401396
Caused by:
@@ -419,9 +414,9 @@ Caused by:
419414
r" An IO error occurred when talking to the server
420415
421416
Caused by:
422-
ssh: Could not resolve hostname needs-proxy.invalid"
417+
ssh: Could not resolve hostname needs-proxy.invalid[..]"
423418
} else {
424-
" failed to resolve address for needs-proxy.invalid: Name or service not known; class=Net (12)"
419+
" failed to resolve address for needs-proxy.invalid: [..] not known; class=Net (12)"
425420
}
426421
))
427422
.run();

0 commit comments

Comments
 (0)