Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: bypass the proxy if testing DNS override #2341

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ async fn overridden_dns_resolution_with_gai() {
server.addr().port()
);
let client = reqwest::Client::builder()
.no_proxy()
.resolve(overridden_domain, server.addr())
.build()
.expect("client builder");
Expand All @@ -270,6 +271,7 @@ async fn overridden_dns_resolution_with_gai_multiple() {
// the server runs on IPv4 localhost, so provide both IPv4 and IPv6 and let the happy eyeballs
// algorithm decide which address to use.
let client = reqwest::Client::builder()
.no_proxy()
.resolve_to_addrs(
overridden_domain,
&[
Expand Down Expand Up @@ -302,6 +304,7 @@ async fn overridden_dns_resolution_with_hickory_dns() {
server.addr().port()
);
let client = reqwest::Client::builder()
.no_proxy()
.resolve(overridden_domain, server.addr())
.hickory_dns(true)
.build()
Expand All @@ -328,6 +331,7 @@ async fn overridden_dns_resolution_with_hickory_dns_multiple() {
// the server runs on IPv4 localhost, so provide both IPv4 and IPv6 and let the happy eyeballs
// algorithm decide which address to use.
let client = reqwest::Client::builder()
.no_proxy()
.resolve_to_addrs(
overridden_domain,
&[
Expand Down