From 9abf7d87da7cd3c36791703715da0b1c42f0116a Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 9 Feb 2024 23:28:42 +0000 Subject: [PATCH] Fix various test runs in `test.sh` --- src/http.rs | 7 ++++--- test.sh | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/http.rs b/src/http.rs index 98aec61..073ba66 100644 --- a/src/http.rs +++ b/src/http.rs @@ -143,7 +143,8 @@ mod imp { mod test { use super::*; - use crate::validation::{parse_rr_stream, verify_rr_stream}; + use crate::ser::parse_rr_stream; + use crate::validation::verify_rr_stream; use minreq; @@ -165,7 +166,7 @@ mod test { #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn test_lookup_a() { - let ns = "4.4.4.4:53".parse().unwrap(); + let ns = "9.9.9.9:53".parse().unwrap(); let listener = tokio::net::TcpListener::bind("127.0.0.1:17493").await .expect("Failed to bind to socket"); tokio::spawn(imp::run_server(listener, ns)); @@ -176,7 +177,7 @@ mod test { assert_eq!(resp.status_code, 200); let rrs = parse_rr_stream(resp.as_bytes()).unwrap(); let verified_rrs = verify_rr_stream(&rrs).unwrap(); - assert_eq!(verified_rrs.verified_rrs.len(), 1); + assert!(verified_rrs.verified_rrs.len() >= 1); } #[tokio::test(flavor = "multi_thread", worker_threads = 1)] diff --git a/test.sh b/test.sh index 240c0b6..dc1245c 100755 --- a/test.sh +++ b/test.sh @@ -4,9 +4,13 @@ cargo test --no-default-features cargo test cargo test --no-default-features --features std cargo test --no-default-features --features tokio +cargo test --no-default-features --features validation +cargo test --features std,tokio,validation cargo test --no-default-features --features build_server cargo build --lib cargo build --lib --features std cargo build --lib --features tokio +cargo build --lib --features validation +cargo build --lib --features std,tokio,validation cargo build --bin http_proof_gen --features build_server cargo doc --features std,tokio,validation -- 2.39.5