Skip to content

Commit

Permalink
test: Disable network tests in Nix
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Apr 24, 2024
1 parent ed4655b commit 1975da7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ trust-dns-resolver = { version = "0.23", features = ["tokio-runtime"] }

[features]
default = []
pure_tests = []
openssl_src = ["dep:openssl-sys"]
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
partitionType = "count";

# Disable impure tests (which access the network and/or filesystem)
cargoNextestExtraArgs = "--no-fail-fast";
cargoNextestExtraArgs = "--no-fail-fast --features pure_tests";
};
};

Expand Down
1 change: 1 addition & 0 deletions src/targets/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ impl Display for DnsTarget {
}

#[cfg(test)]
#[cfg(not(feature = "pure_tests"))]
mod tests {
use crate::sample::SampleValue;

Expand Down

0 comments on commit 1975da7

Please sign in to comment.