@@ -241,16 +241,14 @@ Caused by:
241
241
An IO error occurred when talking to the server
242
242
243
243
Caused by:
244
- [35] SSL connect error (schannel: failed to receive handshake, SSL/TLS connection failed )"
244
+ [35] SSL connect error ([..] )"
245
245
} else if cfg!( windows) {
246
- r"\
247
- failed to send request: A connection with the server could not be established
248
- ; class=Os (2)"
246
+ " failed to send request: A connection with the server could not be established\n ; class=Os (2)"
249
247
} else if cfg!( target_os = "macos" ) {
250
248
// macOS is difficult to tests as some builds may use Security.framework,
251
249
// while others may use OpenSSL. In that case, let's just not verify the error
252
250
// message here.
253
- "[..] "
251
+ "... "
254
252
} else {
255
253
r" SSL [ERROR] syscall failure: ; class=Os (2)"
256
254
}
@@ -302,39 +300,40 @@ fn ssh_something_happens() {
302
300
// "[..]banner exchange: Connection to 127.0.0.1 [..]"
303
301
// banner exchange: Connection to 127.0.0.1 port 62250: Software caused connection abort
304
302
// But since there is no common meaningful sequence or word, we can only match a small telling sequence of characters.
305
- "onnect" . to_string ( )
306
- } else {
307
303
format ! (
308
- r"
309
- Caused by:
310
- failed to clone into: [ROOT]/home/.cargo/git/db/bar-[HASH]
311
-
312
- Caused by:
313
- network failure seems to have happened
314
- if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
315
- https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
316
-
317
- Caused by:
318
- An IO error occurred when talking to the server
319
-
320
- Caused by:
321
- Connection closed by {} port {}
322
- " ,
304
+ " banner exchange: Connection to {} port {}: Software caused connection abort" ,
323
305
addr. ip( ) ,
324
306
addr. port( )
325
307
)
308
+ } else {
309
+ "[..]Connection closed by [..]" . to_string ( )
326
310
} ;
327
311
format ! (
328
312
"\
329
313
[UPDATING] git repository `ssh://{addr}/foo/bar`
314
+ ...
330
315
[ERROR] failed to get `bar` as a dependency of package `foo v0.0.1 ([ROOT]/foo)`
331
316
332
317
Caused by:
333
318
failed to load source for dependency `bar`
334
319
335
320
Caused by:
336
321
Unable to update ssh://{addr}/foo/bar
337
- {message}"
322
+
323
+ Caused by:
324
+ failed to clone into: [ROOT]/home/.cargo/git/db/bar-[HASH]
325
+
326
+ Caused by:
327
+ network failure seems to have happened
328
+ if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
329
+ https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
330
+
331
+ Caused by:
332
+ An IO error occurred when talking to the server
333
+
334
+ Caused by:
335
+ {message}
336
+ "
338
337
)
339
338
} else {
340
339
format ! (
@@ -393,9 +392,9 @@ fn net_err_suggests_fetch_with_cli() {
393
392
. with_stderr_data ( format ! (
394
393
"\
395
394
[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)
395
+ [WARNING] spurious network error (3 tries remaining): [..] resolve [..] needs-proxy.invalid: [..] known[..]
396
+ [WARNING] spurious network error (2 tries remaining): [..] resolve [..] needs-proxy.invalid: [..] known[..]
397
+ [WARNING] spurious network error (1 tries remaining): [..] resolve [..] needs-proxy.invalid: [..] known[..]
399
398
[ERROR] failed to get `foo` as a dependency of package `foo v0.0.0 ([ROOT]/foo)`
400
399
401
400
Caused by:
@@ -419,9 +418,9 @@ Caused by:
419
418
r" An IO error occurred when talking to the server
420
419
421
420
Caused by:
422
- ssh: Could not resolve hostname needs-proxy.invalid"
421
+ ssh: Could not resolve hostname needs-proxy.invalid[..] "
423
422
} else {
424
- " failed to resolve address for needs-proxy.invalid: Name or service not known; class=Net (12)"
423
+ " failed to resolve address for needs-proxy.invalid: [..] known[..] ; class=Net (12)"
425
424
}
426
425
) )
427
426
. run ( ) ;
@@ -438,8 +437,8 @@ Caused by:
438
437
. with_status ( 101 )
439
438
. with_stderr_data ( str![ [ r#"
440
439
[UPDATING] git repository `ssh://needs-proxy.invalid/git`
441
- [RUNNING] `git fetch --verbose --force --update-head-ok ' ssh://needs-proxy.invalid/git' ' +HEAD:refs/remotes/origin/HEAD' `
442
- ssh: Could not resolve hostname needs-proxy.invalid: Name or service not known
440
+ [RUNNING] `git fetch --verbose --force --update-head-ok [..] ssh://needs-proxy.invalid/git[..] [..] +HEAD:refs/remotes/origin/HEAD[..] `
441
+ ssh: Could not resolve hostname needs-proxy.invalid: [..] not known
443
442
fatal: Could not read from remote repository.
444
443
445
444
Please make sure you have the correct access rights
@@ -456,7 +455,7 @@ Caused by:
456
455
failed to fetch into: [ROOT]/home/.cargo/git/db/git-[HASH]
457
456
458
457
Caused by:
459
- 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)
458
+ 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)
460
459
461
460
"# ] ] )
462
461
. with_stderr_does_not_contain ( "[..]try enabling `git-fetch-with-cli`[..]" )
0 commit comments