Skip to content

Commit

Permalink
fix: Update test to use IP4
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Jun 17, 2024
1 parent af1cc22 commit 09d31c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pact_mock_server/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,15 @@ fn match_request_with_header_with_multiple_values() -> anyhow::Result<()> {
let id = "match_request_with_header_with_multiple_values".to_string();
let mock_server_builder = MockServerBuilder::new()
.with_v4_pact(pact)
.with_id(id.clone());
.with_id(id.clone())
.bind_to("127.0.0.1:0");
let result = manager.spawn_mock_server(mock_server_builder);
let mock_server = result.unwrap();
let port = mock_server.port();

info!("Mock server port = {}", port);
let client = reqwest::blocking::Client::new();
let response = client.get(format!("http://[::1]:{}", port).as_str())
let response = client.get(format!("http://127.0.0.1:{}", port).as_str())
.header(ACCEPT, "application/hal+json, application/json").send();

let mismatches = manager.find_mock_server_by_id(&id, &|_, ms| {
Expand Down

0 comments on commit 09d31c1

Please sign in to comment.