]> git.bitcoin.ninja Git - dnssec-prover/commitdiff
Fix various test runs in `test.sh`
authorMatt Corallo <git@bluematt.me>
Fri, 9 Feb 2024 23:28:42 +0000 (23:28 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 9 Feb 2024 23:28:42 +0000 (23:28 +0000)
src/http.rs
test.sh

index 98aec6181e1aa32e06eb2bf3fb68cfede3af429d..073ba66b50ce701ec10cdffb14e0ef24401a219f 100644 (file)
@@ -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 240c0b66d4a8f39d1ecb7719e5651f5822ebb660..dc1245c35e13d5ec3297671b8db68bf840ab3011 100755 (executable)
--- 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