Skip to content

Commit

Permalink
Fix health_server test (#897)
Browse files Browse the repository at this point in the history
* Fix health_server test

When running all tests in parallel with cargo nextest this would fail since the port is bound in multiple tests

* Update tests/health.rs

Co-authored-by: XAMPPRocky <[email protected]>

---------

Co-authored-by: XAMPPRocky <[email protected]>
  • Loading branch information
Jake-Shadle and XAMPPRocky authored Mar 1, 2024
1 parent 17c9bd2 commit 0195d09
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ on_write: COMPRESS
);
let server_proxy = quilkin::cli::Proxy {
port: server_addr.port(),
qcmp_port: 0,
..<_>::default()
};
// Run server proxy.
Expand All @@ -76,6 +77,7 @@ on_write: DECOMPRESS
);
let client_proxy = quilkin::cli::Proxy {
port: client_addr.port(),
qcmp_port: 0,
..<_>::default()
};
// Run client proxy.
Expand Down
1 change: 1 addition & 0 deletions tests/firewall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ async fn test(

let server_proxy = quilkin::cli::Proxy {
port: server_port,
qcmp_port: 0,
..<_>::default()
};
let server_config = std::sync::Arc::new(quilkin::Config::default());
Expand Down
5 changes: 4 additions & 1 deletion tests/health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ async fn health_server() {
});
t.run_server(
server_config,
None,
Some(quilkin::Proxy {
qcmp_port: 0,
..Default::default()
}),
Some(Some((std::net::Ipv6Addr::UNSPECIFIED, 9093).into())),
)
.await;
Expand Down
1 change: 1 addition & 0 deletions tests/local_rate_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ period: 1
quilkin::test::map_addr_to_localhost(&mut server_addr);
let server_proxy = quilkin::cli::Proxy {
port: server_addr.port(),
qcmp_port: 0,
..<_>::default()
};
let server_config = std::sync::Arc::new(quilkin::Config::default());
Expand Down
1 change: 1 addition & 0 deletions tests/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ async fn metrics_server() {
quilkin::test::map_addr_to_localhost(&mut server_addr);
let server_proxy = quilkin::cli::Proxy {
port: server_addr.port(),
qcmp_port: 0,
..<_>::default()
};
let server_config = std::sync::Arc::new(quilkin::Config::default());
Expand Down
1 change: 1 addition & 0 deletions tests/no_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ async fn echo() {
let local_addr = available_addr(&AddressType::Random).await;
let server_proxy = quilkin::cli::Proxy {
port: local_addr.port(),
qcmp_port: 0,
..<_>::default()
};
let server_config = std::sync::Arc::new(quilkin::Config::default());
Expand Down

0 comments on commit 0195d09

Please sign in to comment.