diff --git a/tests/testsuite/net_config.rs b/tests/testsuite/net_config.rs index 1892a070f9e3..03605f097fa0 100644 --- a/tests/testsuite/net_config.rs +++ b/tests/testsuite/net_config.rs @@ -1,8 +1,7 @@ //! Tests for network configuration. -#![allow(deprecated)] - use cargo_test_support::project; +use cargo_test_support::str; #[cargo_test] fn net_retry_loads_from_config() { @@ -33,10 +32,11 @@ fn net_retry_loads_from_config() { p.cargo("check -v") .with_status(101) - .with_stderr_contains( - "[WARNING] spurious network error \ - (1 tries remaining): [..]", - ) + .with_stderr_data(str![[r#" +... +[WARNING] spurious network error (1 tries remaining): [7] Couldn't connect to server (Failed to connect to 127.0.0.1 port 11 after [..] ms: Couldn't connect to server)[..] +... +"#]]) .run(); } @@ -67,10 +67,11 @@ fn net_retry_git_outputs_warning() { p.cargo("check -v -j 1") .with_status(101) - .with_stderr_contains( - "[WARNING] spurious network error \ - (2 tries remaining): [..]", - ) - .with_stderr_contains("[WARNING] spurious network error (1 tries remaining): [..]") + .with_stderr_data(str![[r#" +... +[WARNING] spurious network error (2 tries remaining): [7] Couldn't connect to server (Failed to connect to 127.0.0.1 port 11 after [..] ms: Couldn't connect to server)[..] +[WARNING] spurious network error (1 tries remaining): [7] Couldn't connect to server (Failed to connect to 127.0.0.1 port 11 after [..] ms: Couldn't connect to server)[..] +... +"#]]) .run(); }