Skip to content

Commit

Permalink
test: migrate net_config to snapbox
Browse files Browse the repository at this point in the history
  • Loading branch information
eth3lbert committed Jun 28, 2024
1 parent ea171f6 commit 2055e5d
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions tests/testsuite/net_config.rs
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down Expand Up @@ -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();
}

Expand Down Expand Up @@ -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();
}

0 comments on commit 2055e5d

Please sign in to comment.