diff --git a/README.md b/README.md index b355e64d..bf2b1f6d 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ a restart of the server process. ### DNS-over-TLS and DNS-over-HTTPS on the Server -Support of TLS on the Server is managed through a pkcs12 der file. The documentation is captured in the example test config file, [example.toml](https://github.com/bluejekyll/trust-dns/blob/main/tests/test-data/named_test_configs/example.toml). A registered certificate to the server can be pinned to the Client with the `add_ca()` method. Alternatively, as the client uses the rust-native-tls library, it should work with certificate signed by any standard CA. +Support of TLS on the Server is managed through a pkcs12 der file. The documentation is captured in the example test config file, [example.toml](https://github.com/bluejekyll/trust-dns/blob/main/tests/test-data/test_configs/example.toml). A registered certificate to the server can be pinned to the Client with the `add_ca()` method. Alternatively, as the client uses the rust-native-tls library, it should work with certificate signed by any standard CA. ## DNS-over-TLS and DNS-over-HTTPS @@ -260,7 +260,7 @@ so this should allow it to work with most internal loads. You may want not passing the `-p` parameter will run on default DNS ports. For the tls features, there are also port options for those, see `trust-dns --help` ```shell -./target/release/trust-dns -c ./tests/test-data/named_test_configs/example.toml -z ./tests/test-data/named_test_configs/ -p 24141 +./target/release/trust-dns -c ./tests/test-data/test_configs/example.toml -z ./tests/test-data/test_configs/ -p 24141 ``` - Query the just launched server with `dig` diff --git a/bin/README.md b/bin/README.md index b4654d79..5c9926d8 100644 --- a/bin/README.md +++ b/bin/README.md @@ -16,7 +16,7 @@ This a named implementation for DNS zone hosting. It is capable of performing si ## DNS-over-TLS and DNS-over-HTTPS -Support of TLS on the Server is managed through a pkcs12 der file. The documentation is captured in the example test config file, [example.toml](https://github.com/bluejekyll/trust-dns/blob/main/tests/test-data/named_test_configs/example.toml). A registered certificate to the server can be pinned to the Client with the `add_ca()` method. Alternatively, as the client uses the rust-native-tls library, it should work with certificate signed by any standard CA. +Support of TLS on the Server is managed through a pkcs12 der file. The documentation is captured in the example test config file, [example.toml](https://github.com/bluejekyll/trust-dns/blob/main/tests/test-data/test_configs/example.toml). A registered certificate to the server can be pinned to the Client with the `add_ca()` method. Alternatively, as the client uses the rust-native-tls library, it should work with certificate signed by any standard CA. DoT and DoH are supported. This is accomplished through the use of one of `native-tls`, `openssl`, or `rustls` (only `rustls` is currently supported for DoH). The Resolver requires only requires valid DoT or DoH resolvers being registered in order to be used. diff --git a/bin/benches/bind_conf/example.conf b/bin/benches/bind_conf/example.conf index 5549b314..7d6018fa 100644 --- a/bin/benches/bind_conf/example.conf +++ b/bin/benches/bind_conf/example.conf @@ -1,7 +1,7 @@ /* Trust-DNS bench setup: this is meant to mimic the trust-dns-server config - which is in tests/test-data/named_test_configs/example.toml + which is in tests/test-data/test_configs/example.toml */ controls { /* empty */ }; @@ -15,30 +15,30 @@ options { zone "localhost" { type primary; - file "../../../tests/test-data/named_test_configs/default/localhost.zone"; + file "../../../tests/test-data/test_configs/default/localhost.zone"; }; zone "0.0.127.in-addr.arpa" { type primary; - file "../../../tests/test-data/named_test_configs/default/127.0.0.1.zone"; + file "../../../tests/test-data/test_configs/default/127.0.0.1.zone"; }; zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" { type primary; - file "../../../tests/test-data/named_test_configs/default/ipv6_1.zone"; + file "../../../tests/test-data/test_configs/default/ipv6_1.zone"; }; zone "255.in-addr.arpa" { type primary; - file "../../../tests/test-data/named_test_configs/default/255.zone"; + file "../../../tests/test-data/test_configs/default/255.zone"; }; zone "0.in-addr.arpa" { type primary; - file "../../../tests/test-data/named_test_configs/default/0.zone"; + file "../../../tests/test-data/test_configs/default/0.zone"; }; zone "example.com" { type primary; - file "../../../tests/test-data/named_test_configs/example.com.zone"; + file "../../../tests/test-data/test_configs/example.com.zone"; }; diff --git a/bin/benches/comparison_benches.rs b/bin/benches/comparison_benches.rs index 944299b0..0e186b5f 100644 --- a/bin/benches/comparison_benches.rs +++ b/bin/benches/comparison_benches.rs @@ -87,11 +87,8 @@ fn trust_dns_process() -> (NamedProcess, u16) { let ws_root = env::var("WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned()); let named_path = format!("{}/target/release/named", ws_root); - let config_path = format!( - "{}/tests/test-data/named_test_configs/example.toml", - ws_root - ); - let zone_dir = format!("{}/tests/test-data/named_test_configs", ws_root); + let config_path = format!("{}/tests/test-data/test_configs/example.toml", ws_root); + let zone_dir = format!("{}/tests/test-data/test_configs", ws_root); File::open(&named_path).expect(&named_path); File::open(&config_path).expect(&config_path); diff --git a/bin/tests/named_https_tests.rs b/bin/tests/named_https_tests.rs index c3845100..0e66bc55 100644 --- a/bin/tests/named_https_tests.rs +++ b/bin/tests/named_https_tests.rs @@ -37,7 +37,7 @@ fn test_example_https_toml_startup() { println!("using server src path: {}", server_path); File::open(format!( - "{}/tests/test-data/named_test_configs/sec/example.cert", + "{}/tests/test-data/test_configs/sec/example.cert", server_path )) .expect("failed to open cert") diff --git a/bin/tests/named_openssl_tests.rs b/bin/tests/named_openssl_tests.rs index ef6f888b..90449966 100644 --- a/bin/tests/named_openssl_tests.rs +++ b/bin/tests/named_openssl_tests.rs @@ -45,7 +45,7 @@ fn test_startup(toml: &'static str) { println!("using server src path: {}", server_path); File::open(&format!( - "{}/tests/test-data/named_test_configs/sec/example.cert", + "{}/tests/test-data/test_configs/sec/example.cert", server_path )) .expect("failed to open cert") diff --git a/bin/tests/named_quic_tests.rs b/bin/tests/named_quic_tests.rs index a8ef861d..6dbed44c 100644 --- a/bin/tests/named_quic_tests.rs +++ b/bin/tests/named_quic_tests.rs @@ -29,7 +29,7 @@ fn test_example_quic_toml_startup() { println!("using server src path: {server_path} and quic_port: {quic_port:?}"); File::open(format!( - "{}/tests/test-data/named_test_configs/sec/example.cert", + "{}/tests/test-data/test_configs/sec/example.cert", server_path )) .expect("failed to open cert") diff --git a/bin/tests/named_rustls_tests.rs b/bin/tests/named_rustls_tests.rs index 6276212c..00355337 100644 --- a/bin/tests/named_rustls_tests.rs +++ b/bin/tests/named_rustls_tests.rs @@ -38,7 +38,7 @@ fn test_example_tls_toml_startup() { println!("using server src path: {}", server_path); File::open(format!( - "{}/tests/test-data/named_test_configs/sec/example.cert", + "{}/tests/test-data/test_configs/sec/example.cert", server_path )) .expect("failed to open cert") diff --git a/bin/tests/named_test_rsa_dnssec.rs b/bin/tests/named_test_rsa_dnssec.rs index e359d9fc..aae09ddc 100644 --- a/bin/tests/named_test_rsa_dnssec.rs +++ b/bin/tests/named_test_rsa_dnssec.rs @@ -111,7 +111,7 @@ fn generic_test(config_toml: &str, key_path: &str, key_format: KeyFormat, algori fn test_rsa_sha256() { generic_test( confg_toml(), - "tests/test-data/named_test_configs/dnssec/rsa_2048.pem", + "tests/test-data/test_configs/dnssec/rsa_2048.pem", KeyFormat::Pem, Algorithm::RSASHA256, ); @@ -122,7 +122,7 @@ fn test_rsa_sha256() { fn test_rsa_sha512() { generic_test( confg_toml(), - "tests/test-data/named_test_configs/dnssec/rsa_2048.pem", + "tests/test-data/test_configs/dnssec/rsa_2048.pem", KeyFormat::Pem, Algorithm::RSASHA512, ); @@ -133,7 +133,7 @@ fn test_rsa_sha512() { fn test_ecdsa_p256() { generic_test( confg_toml(), - "tests/test-data/named_test_configs/dnssec/ecdsa_p256.pem", + "tests/test-data/test_configs/dnssec/ecdsa_p256.pem", KeyFormat::Pem, Algorithm::ECDSAP256SHA256, ); @@ -144,7 +144,7 @@ fn test_ecdsa_p256() { fn test_ecdsa_p256_pkcs8() { generic_test( confg_toml(), - "tests/test-data/named_test_configs/dnssec/ecdsa_p256.pk8", + "tests/test-data/test_configs/dnssec/ecdsa_p256.pk8", KeyFormat::Pkcs8, Algorithm::ECDSAP256SHA256, ); @@ -155,7 +155,7 @@ fn test_ecdsa_p256_pkcs8() { fn test_ecdsa_p384() { generic_test( confg_toml(), - "tests/test-data/named_test_configs/dnssec/ecdsa_p384.pem", + "tests/test-data/test_configs/dnssec/ecdsa_p384.pem", KeyFormat::Pem, Algorithm::ECDSAP384SHA384, ); @@ -166,7 +166,7 @@ fn test_ecdsa_p384() { fn test_ecdsa_p384_pkcs8() { generic_test( confg_toml(), - "tests/test-data/named_test_configs/dnssec/ecdsa_p384.pk8", + "tests/test-data/test_configs/dnssec/ecdsa_p384.pk8", KeyFormat::Pkcs8, Algorithm::ECDSAP384SHA384, ); @@ -177,7 +177,7 @@ fn test_ecdsa_p384_pkcs8() { fn test_ed25519() { generic_test( confg_toml(), - "tests/test-data/named_test_configs/dnssec/ed25519.pk8", + "tests/test-data/test_configs/dnssec/ed25519.pk8", KeyFormat::Pkcs8, Algorithm::ED25519, ); @@ -189,7 +189,7 @@ fn test_ed25519() { fn test_rsa_sha1_fails() { generic_test( confg_toml(), - "tests/test-data/named_test_configs/dnssec/rsa_2048.pem", + "tests/test-data/test_configs/dnssec/rsa_2048.pem", KeyFormat::Pem, Algorithm::RSASHA1, ); @@ -202,13 +202,12 @@ fn test_dnssec_restart_with_update_journal() { // TODO: make journal path configurable, it should be in target/tests/... let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned()); let server_path = Path::new(&server_path); - let journal = - server_path.join("tests/test-data/named_test_configs/example.com_dnssec_update.jrnl"); + let journal = server_path.join("tests/test-data/test_configs/example.com_dnssec_update.jrnl"); std::fs::remove_file(&journal).ok(); generic_test( "dnssec_with_update.toml", - "tests/test-data/named_test_configs/dnssec/rsa_2048.pem", + "tests/test-data/test_configs/dnssec/rsa_2048.pem", KeyFormat::Pem, Algorithm::RSASHA256, ); @@ -219,7 +218,7 @@ fn test_dnssec_restart_with_update_journal() { // and all dnssec tests should still pass generic_test( "dnssec_with_update.toml", - "tests/test-data/named_test_configs/dnssec/rsa_2048.pem", + "tests/test-data/test_configs/dnssec/rsa_2048.pem", KeyFormat::Pem, Algorithm::RSASHA256, ); @@ -239,12 +238,12 @@ fn test_dnssec_restart_with_update_journal_dep() { // TODO: make journal path configurable, it should be in target/tests/... let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "..".to_owned()); let server_path = Path::new(&server_path); - let journal = server_path.join("tests/test-data/named_test_configs/example.com.jrnl"); + let journal = server_path.join("tests/test-data/test_configs/example.com.jrnl"); std::fs::remove_file(&journal).ok(); generic_test( "dnssec_with_update_deprecated.toml", - "tests/test-data/named_test_configs/dnssec/rsa_2048.pem", + "tests/test-data/test_configs/dnssec/rsa_2048.pem", KeyFormat::Pem, Algorithm::RSASHA256, ); @@ -255,7 +254,7 @@ fn test_dnssec_restart_with_update_journal_dep() { // and all dnssec tests should still pass generic_test( "dnssec_with_update_deprecated.toml", - "tests/test-data/named_test_configs/dnssec/rsa_2048.pem", + "tests/test-data/test_configs/dnssec/rsa_2048.pem", KeyFormat::Pem, Algorithm::RSASHA256, ); diff --git a/bin/tests/server_harness/mod.rs b/bin/tests/server_harness/mod.rs index 6c50ba7c..42b521f7 100644 --- a/bin/tests/server_harness/mod.rs +++ b/bin/tests/server_harness/mod.rs @@ -51,10 +51,10 @@ where "trust_dns_client=debug,trust_dns_proto=debug,trust_dns_resolver=debug,trust_dns_server=debug", ).arg("-d") .arg(&format!( - "--config={}/tests/test-data/named_test_configs/{}", + "--config={}/tests/test-data/test_configs/{}", server_path, toml )).arg(&format!( - "--zonedir={}/tests/test-data/named_test_configs", + "--zonedir={}/tests/test-data/test_configs", server_path )).arg(&format!("--port={}", 0)) .arg(&format!("--tls-port={}", 0)) diff --git a/crates/server/src/store/file/authority.rs b/crates/server/src/store/file/authority.rs index 3b588e95..8ca73c7f 100644 --- a/crates/server/src/store/file/authority.rs +++ b/crates/server/src/store/file/authority.rs @@ -366,12 +366,12 @@ mod tests { fn test_load_zone() { #[cfg(feature = "dnssec")] let config = FileConfig { - zone_file_path: "../../tests/test-data/named_test_configs/dnssec/example.com.zone" + zone_file_path: "../../tests/test-data/test_configs/dnssec/example.com.zone" .to_string(), }; #[cfg(not(feature = "dnssec"))] let config = FileConfig { - zone_file_path: "../../tests/test-data/named_test_configs/example.com.zone".to_string(), + zone_file_path: "../../tests/test-data/test_configs/example.com.zone".to_string(), }; let authority = FileAuthority::try_from_config( Name::from_str("example.com.").unwrap(), diff --git a/crates/server/tests/authority_battery/basic.rs b/crates/server/tests/authority_battery/basic.rs index 94775358..50ac88cd 100644 --- a/crates/server/tests/authority_battery/basic.rs +++ b/crates/server/tests/authority_battery/basic.rs @@ -725,7 +725,7 @@ macro_rules! define_basic_test { // Useful for getting debug logs // env_logger::try_init().ok(); - let authority = crate::$new("../../tests/test-data/named_test_configs/example.com.zone", module_path!(), stringify!($f)); + let authority = crate::$new("../../tests/test-data/test_configs/example.com.zone", module_path!(), stringify!($f)); crate::authority_battery::basic::$f(authority); } )* diff --git a/crates/server/tests/authority_battery/dnssec.rs b/crates/server/tests/authority_battery/dnssec.rs index 88fa1bcc..2692138b 100644 --- a/crates/server/tests/authority_battery/dnssec.rs +++ b/crates/server/tests/authority_battery/dnssec.rs @@ -379,7 +379,7 @@ pub fn add_signers(authority: &mut A) -> Vec { // rsa { let key_config = KeyConfig { - key_path: "../../tests/test-data/named_test_configs/dnssec/rsa_2048.pem".to_string(), + key_path: "../../tests/test-data/test_configs/dnssec/rsa_2048.pem".to_string(), password: Some("123456".to_string()), algorithm: Algorithm::RSASHA512.to_string(), signer_name: Some(signer_name.to_string()), @@ -399,7 +399,7 @@ pub fn add_signers(authority: &mut A) -> Vec { // // ecdsa_p256 // { // let key_config = KeyConfig { - // key_path: "../../tests/test-data/named_test_configs/dnssec/ecdsa_p256.pem".to_string(), + // key_path: "../../tests/test-data/test_configs/dnssec/ecdsa_p256.pem".to_string(), // password: None, // algorithm: Algorithm::ECDSAP256SHA256.to_string(), // signer_name: Some(signer_name.clone().to_string()), @@ -416,7 +416,7 @@ pub fn add_signers(authority: &mut A) -> Vec { // // ecdsa_p384 // { // let key_config = KeyConfig { - // key_path: "../../tests/test-data/named_test_configs/dnssec/ecdsa_p384.pem".to_string(), + // key_path: "../../tests/test-data/test_configs/dnssec/ecdsa_p384.pem".to_string(), // password: None, // algorithm: Algorithm::ECDSAP384SHA384.to_string(), // signer_name: Some(signer_name.clone().to_string()), @@ -434,7 +434,7 @@ pub fn add_signers(authority: &mut A) -> Vec { #[cfg(feature = "dnssec-ring")] { let key_config = KeyConfig { - key_path: "../../tests/test-data/named_test_configs/dnssec/ed25519.pk8".to_string(), + key_path: "../../tests/test-data/test_configs/dnssec/ed25519.pk8".to_string(), password: None, algorithm: Algorithm::ED25519.to_string(), signer_name: Some(signer_name.to_string()), @@ -458,7 +458,7 @@ macro_rules! define_dnssec_test { $( #[test] fn $f () { - let mut authority = crate::$new("../../tests/test-data/named_test_configs/example.com.zone", module_path!(), stringify!($f)); + let mut authority = crate::$new("../../tests/test-data/test_configs/example.com.zone", module_path!(), stringify!($f)); let keys = crate::authority_battery::dnssec::add_signers(&mut authority); crate::authority_battery::dnssec::$f(authority, &keys); } diff --git a/crates/server/tests/authority_battery/dynamic_update.rs b/crates/server/tests/authority_battery/dynamic_update.rs index ac184520..06facbf2 100644 --- a/crates/server/tests/authority_battery/dynamic_update.rs +++ b/crates/server/tests/authority_battery/dynamic_update.rs @@ -791,7 +791,7 @@ pub fn add_auth(authority: &mut A) -> Vec { #[cfg(feature = "dnssec-openssl")] { let key_config = KeyConfig { - key_path: "../../tests/test-data/named_test_configs/dnssec/rsa_2048.pem".to_string(), + key_path: "../../tests/test-data/test_configs/dnssec/rsa_2048.pem".to_string(), password: Some("123456".to_string()), algorithm: Algorithm::RSASHA512.to_string(), signer_name: Some(update_name.to_string()), @@ -816,7 +816,7 @@ pub fn add_auth(authority: &mut A) -> Vec { // // ecdsa_p256 // { // let key_config = KeyConfig { - // key_path: "tests/test-data/named_test_configs/dnssec/ecdsa_p256.pem".to_string(), + // key_path: "tests/test-data/test_configs/dnssec/ecdsa_p256.pem".to_string(), // password: None, // algorithm: Algorithm::ECDSAP256SHA256.to_string(), // signer_name: Some(signer_name.clone().to_string()), @@ -833,7 +833,7 @@ pub fn add_auth(authority: &mut A) -> Vec { // // ecdsa_p384 // { // let key_config = KeyConfig { - // key_path: "../../tests/test-data/named_test_configs/dnssec/ecdsa_p384.pem".to_string(), + // key_path: "../../tests/test-data/test_configs/dnssec/ecdsa_p384.pem".to_string(), // password: None, // algorithm: Algorithm::ECDSAP384SHA384.to_string(), // signer_name: Some(signer_name.clone().to_string()), @@ -851,7 +851,7 @@ pub fn add_auth(authority: &mut A) -> Vec { #[cfg(feature = "dnssec-ring")] { let key_config = KeyConfig { - key_path: "../../tests/test-data/named_test_configs/dnssec/ed25519.pk8".to_string(), + key_path: "../../tests/test-data/test_configs/dnssec/ed25519.pk8".to_string(), password: None, algorithm: Algorithm::ED25519.to_string(), signer_name: Some(update_name.to_string()), @@ -880,7 +880,7 @@ macro_rules! define_update_test { $( #[test] fn $f () { - let mut authority = crate::$new("../../tests/test-data/named_test_configs/example.com.zone", module_path!(), stringify!($f)); + let mut authority = crate::$new("../../tests/test-data/test_configs/example.com.zone", module_path!(), stringify!($f)); let keys = crate::authority_battery::dynamic_update::add_auth(&mut authority); crate::authority_battery::dynamic_update::$f(authority, &keys); } diff --git a/crates/server/tests/config_tests.rs b/crates/server/tests/config_tests.rs index 0a933ba7..3ee79a3a 100644 --- a/crates/server/tests/config_tests.rs +++ b/crates/server/tests/config_tests.rs @@ -25,7 +25,7 @@ use trust_dns_server::config::*; fn test_read_config() { let server_path = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "../..".to_owned()); let path: PathBuf = - PathBuf::from(server_path).join("tests/test-data/named_test_configs/example.toml"); + PathBuf::from(server_path).join("tests/test-data/test_configs/example.toml"); if !path.exists() { panic!("can't locate example.toml and other configs: {:?}", path) @@ -240,7 +240,7 @@ tls_listen_port = 8853 fn test_config(path: &str) { let workspace = env::var("TDNS_WORKSPACE_ROOT").unwrap_or_else(|_| "../..".to_owned()); let path = PathBuf::from(workspace) - .join("tests/test-data/named_test_configs") + .join("tests/test-data/test_configs") .join(path) .with_extension("toml"); assert!(path.exists(), "does not exist: {}", path.display()); diff --git a/crates/server/tests/store_file_tests.rs b/crates/server/tests/store_file_tests.rs index b88449bb..ba0f96c7 100644 --- a/crates/server/tests/store_file_tests.rs +++ b/crates/server/tests/store_file_tests.rs @@ -30,8 +30,7 @@ dnssec_battery!(file); #[test] fn test_all_lines_are_loaded() { let config = FileConfig { - zone_file_path: "../../tests/test-data/named_test_configs/default/nonewline.zone" - .to_string(), + zone_file_path: "../../tests/test-data/test_configs/default/nonewline.zone".to_string(), }; let mut authority = FileAuthority::try_from_config( @@ -52,8 +51,7 @@ fn test_all_lines_are_loaded() { #[tokio::test] async fn test_ttl_wilcard() { let config = FileConfig { - zone_file_path: "../../tests/test-data/named_test_configs/default/test.local.zone" - .to_string(), + zone_file_path: "../../tests/test-data/test_configs/default/test.local.zone".to_string(), }; let zone_name = LowerName::from_str("test.local.").unwrap(); diff --git a/tests/compatibility-tests/tests/conf/bind-example.conf b/tests/compatibility-tests/tests/conf/bind-example.conf index 009410ee..e0e84f5b 100644 --- a/tests/compatibility-tests/tests/conf/bind-example.conf +++ b/tests/compatibility-tests/tests/conf/bind-example.conf @@ -1,7 +1,7 @@ /* Trust-DNS bench setup: this is meant to mimic the trust-dns-server config - which is in tests/test-data/named_test_configs/example.toml + which is in tests/test-data/test_configs/example.toml */ include "../../tests/compatibility-tests/tests/conf/tsig.conf"; @@ -19,27 +19,27 @@ options { zone "localhost" { type master; - file "../../crates/server/tests/test-data/named_test_configs/default/localhost.zone"; + file "../../crates/server/tests/test-data/test_configs/default/localhost.zone"; }; zone "0.0.127.in-addr.arpa" { type master; - file "../../crates/server/tests/test-data/named_test_configs/default/127.0.0.1.zone"; + file "../../crates/server/tests/test-data/test_configs/default/127.0.0.1.zone"; }; zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" { type master; - file "../../crates/server/tests/test-data/named_test_configs/default/ipv6_1.zone"; + file "../../crates/server/tests/test-data/test_configs/default/ipv6_1.zone"; }; zone "255.in-addr.arpa" { type master; - file "../../crates/server/tests/test-data/named_test_configs/default/255.zone"; + file "../../crates/server/tests/test-data/test_configs/default/255.zone"; }; zone "0.in-addr.arpa" { type master; - file "../../crates/server/tests/test-data/named_test_configs/default/0.zone"; + file "../../crates/server/tests/test-data/test_configs/default/0.zone"; }; zone "example.com" { diff --git a/tests/test-data/named_test_configs/all_supported_dnssec.toml b/tests/test-data/test_configs/all_supported_dnssec.toml similarity index 79% rename from tests/test-data/named_test_configs/all_supported_dnssec.toml rename to tests/test-data/test_configs/all_supported_dnssec.toml index 376e7182..47e9384e 100644 --- a/tests/test-data/named_test_configs/all_supported_dnssec.toml +++ b/tests/test-data/test_configs/all_supported_dnssec.toml @@ -40,7 +40,7 @@ file = "example.com.zone" enable_dnssec = true [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/rsa_2048.pem" +key_path = "../tests/test-data/test_configs/dnssec/rsa_2048.pem" ## the password used to encrypt/decrypt the file (must be PEM), blank for none password = "123456" ## specify the algorithm @@ -53,37 +53,37 @@ is_zone_signing_key = true # create_if_absent = false [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/rsa_2048.pem" +key_path = "../tests/test-data/test_configs/dnssec/rsa_2048.pem" password = "123456" algorithm = "RSASHA512" is_zone_signing_key = true [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/ecdsa_p256.pem" +key_path = "../tests/test-data/test_configs/dnssec/ecdsa_p256.pem" # password = "123456" algorithm = "ECDSAP256SHA256" is_zone_signing_key = true [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/ecdsa_p384.pem" +key_path = "../tests/test-data/test_configs/dnssec/ecdsa_p384.pem" # password = "123456" algorithm = "ECDSAP384SHA384" is_zone_signing_key = true [[zones.keys]] # Requires --features=ring -key_path = "../tests/test-data/named_test_configs/dnssec/ecdsa_p256.pk8" +key_path = "../tests/test-data/test_configs/dnssec/ecdsa_p256.pk8" algorithm = "ECDSAP256SHA256" is_zone_signing_key = true [[zones.keys]] # Requires --features=ring -key_path = "../tests/test-data/named_test_configs/dnssec/ecdsa_p384.pk8" +key_path = "../tests/test-data/test_configs/dnssec/ecdsa_p384.pk8" algorithm = "ECDSAP384SHA384" is_zone_signing_key = true [[zones.keys]] # Requires --features=ring -key_path = "../tests/test-data/named_test_configs/dnssec/ed25519.pk8" +key_path = "../tests/test-data/test_configs/dnssec/ed25519.pk8" algorithm = "ED25519" is_zone_signing_key = true diff --git a/tests/test-data/named_test_configs/default/0.zone b/tests/test-data/test_configs/default/0.zone similarity index 100% rename from tests/test-data/named_test_configs/default/0.zone rename to tests/test-data/test_configs/default/0.zone diff --git a/tests/test-data/named_test_configs/default/127.0.0.1.zone b/tests/test-data/test_configs/default/127.0.0.1.zone similarity index 100% rename from tests/test-data/named_test_configs/default/127.0.0.1.zone rename to tests/test-data/test_configs/default/127.0.0.1.zone diff --git a/tests/test-data/named_test_configs/default/255.zone b/tests/test-data/test_configs/default/255.zone similarity index 100% rename from tests/test-data/named_test_configs/default/255.zone rename to tests/test-data/test_configs/default/255.zone diff --git a/tests/test-data/named_test_configs/default/ipv6_1.zone b/tests/test-data/test_configs/default/ipv6_1.zone similarity index 100% rename from tests/test-data/named_test_configs/default/ipv6_1.zone rename to tests/test-data/test_configs/default/ipv6_1.zone diff --git a/tests/test-data/named_test_configs/default/localhost.zone b/tests/test-data/test_configs/default/localhost.zone similarity index 100% rename from tests/test-data/named_test_configs/default/localhost.zone rename to tests/test-data/test_configs/default/localhost.zone diff --git a/tests/test-data/named_test_configs/default/nonewline.zone b/tests/test-data/test_configs/default/nonewline.zone similarity index 100% rename from tests/test-data/named_test_configs/default/nonewline.zone rename to tests/test-data/test_configs/default/nonewline.zone diff --git a/tests/test-data/named_test_configs/default/root.zone b/tests/test-data/test_configs/default/root.zone similarity index 100% rename from tests/test-data/named_test_configs/default/root.zone rename to tests/test-data/test_configs/default/root.zone diff --git a/tests/test-data/named_test_configs/default/test.local.zone b/tests/test-data/test_configs/default/test.local.zone similarity index 100% rename from tests/test-data/named_test_configs/default/test.local.zone rename to tests/test-data/test_configs/default/test.local.zone diff --git a/tests/test-data/named_test_configs/dns_over_https.toml b/tests/test-data/test_configs/dns_over_https.toml similarity index 100% rename from tests/test-data/named_test_configs/dns_over_https.toml rename to tests/test-data/test_configs/dns_over_https.toml diff --git a/tests/test-data/named_test_configs/dns_over_quic.toml b/tests/test-data/test_configs/dns_over_quic.toml similarity index 100% rename from tests/test-data/named_test_configs/dns_over_quic.toml rename to tests/test-data/test_configs/dns_over_quic.toml diff --git a/tests/test-data/named_test_configs/dns_over_tls.toml b/tests/test-data/test_configs/dns_over_tls.toml similarity index 100% rename from tests/test-data/named_test_configs/dns_over_tls.toml rename to tests/test-data/test_configs/dns_over_tls.toml diff --git a/tests/test-data/named_test_configs/dns_over_tls_rustls_and_openssl.toml b/tests/test-data/test_configs/dns_over_tls_rustls_and_openssl.toml similarity index 100% rename from tests/test-data/named_test_configs/dns_over_tls_rustls_and_openssl.toml rename to tests/test-data/test_configs/dns_over_tls_rustls_and_openssl.toml diff --git a/tests/test-data/named_test_configs/dnssec/ecdsa_p256.pem b/tests/test-data/test_configs/dnssec/ecdsa_p256.pem similarity index 100% rename from tests/test-data/named_test_configs/dnssec/ecdsa_p256.pem rename to tests/test-data/test_configs/dnssec/ecdsa_p256.pem diff --git a/tests/test-data/named_test_configs/dnssec/ecdsa_p256.pk8 b/tests/test-data/test_configs/dnssec/ecdsa_p256.pk8 similarity index 100% rename from tests/test-data/named_test_configs/dnssec/ecdsa_p256.pk8 rename to tests/test-data/test_configs/dnssec/ecdsa_p256.pk8 diff --git a/tests/test-data/named_test_configs/dnssec/ecdsa_p384.pem b/tests/test-data/test_configs/dnssec/ecdsa_p384.pem similarity index 100% rename from tests/test-data/named_test_configs/dnssec/ecdsa_p384.pem rename to tests/test-data/test_configs/dnssec/ecdsa_p384.pem diff --git a/tests/test-data/named_test_configs/dnssec/ecdsa_p384.pk8 b/tests/test-data/test_configs/dnssec/ecdsa_p384.pk8 similarity index 100% rename from tests/test-data/named_test_configs/dnssec/ecdsa_p384.pk8 rename to tests/test-data/test_configs/dnssec/ecdsa_p384.pk8 diff --git a/tests/test-data/named_test_configs/dnssec/ed25519.pk8 b/tests/test-data/test_configs/dnssec/ed25519.pk8 similarity index 100% rename from tests/test-data/named_test_configs/dnssec/ed25519.pk8 rename to tests/test-data/test_configs/dnssec/ed25519.pk8 diff --git a/tests/test-data/named_test_configs/dnssec/example.com.zone b/tests/test-data/test_configs/dnssec/example.com.zone similarity index 100% rename from tests/test-data/named_test_configs/dnssec/example.com.zone rename to tests/test-data/test_configs/dnssec/example.com.zone diff --git a/tests/test-data/named_test_configs/dnssec/gen-keys.sh b/tests/test-data/test_configs/dnssec/gen-keys.sh similarity index 100% rename from tests/test-data/named_test_configs/dnssec/gen-keys.sh rename to tests/test-data/test_configs/dnssec/gen-keys.sh diff --git a/tests/test-data/named_test_configs/dnssec/rsa_2048.pem b/tests/test-data/test_configs/dnssec/rsa_2048.pem similarity index 100% rename from tests/test-data/named_test_configs/dnssec/rsa_2048.pem rename to tests/test-data/test_configs/dnssec/rsa_2048.pem diff --git a/tests/test-data/named_test_configs/dnssec_with_update.toml b/tests/test-data/test_configs/dnssec_with_update.toml similarity index 93% rename from tests/test-data/named_test_configs/dnssec_with_update.toml rename to tests/test-data/test_configs/dnssec_with_update.toml index de0a44d3..00001caf 100644 --- a/tests/test-data/named_test_configs/dnssec_with_update.toml +++ b/tests/test-data/test_configs/dnssec_with_update.toml @@ -46,7 +46,7 @@ enable_dnssec = true stores = { type = "sqlite", zone_file_path = "example.com.zone", journal_file_path = "example.com_dnssec_update.jrnl", allow_update = true } [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/rsa_2048.pem" +key_path = "../tests/test-data/test_configs/dnssec/rsa_2048.pem" ## the password used to encrypt/decrypt the file (must be PEM), blank for none password = "123456" ## specify the algorithm @@ -59,7 +59,7 @@ is_zone_signing_key = true # create_if_absent = false [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/rsa_2048.pem" +key_path = "../tests/test-data/test_configs/dnssec/rsa_2048.pem" password = "123456" algorithm = "RSASHA512" is_zone_signing_key = false diff --git a/tests/test-data/named_test_configs/dnssec_with_update_deprecated.toml b/tests/test-data/test_configs/dnssec_with_update_deprecated.toml similarity index 93% rename from tests/test-data/named_test_configs/dnssec_with_update_deprecated.toml rename to tests/test-data/test_configs/dnssec_with_update_deprecated.toml index c3ea687c..cc33bdc4 100644 --- a/tests/test-data/named_test_configs/dnssec_with_update_deprecated.toml +++ b/tests/test-data/test_configs/dnssec_with_update_deprecated.toml @@ -51,7 +51,7 @@ allow_update = true enable_dnssec = true [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/rsa_2048.pem" +key_path = "../tests/test-data/test_configs/dnssec/rsa_2048.pem" ## the password used to encrypt/decrypt the file (must be PEM), blank for none password = "123456" ## specify the algorithm @@ -64,7 +64,7 @@ is_zone_signing_key = true # create_if_absent = false [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/rsa_2048.pem" +key_path = "../tests/test-data/test_configs/dnssec/rsa_2048.pem" password = "123456" algorithm = "RSASHA512" is_zone_signing_key = false diff --git a/tests/test-data/named_test_configs/example.com.zone b/tests/test-data/test_configs/example.com.zone similarity index 100% rename from tests/test-data/named_test_configs/example.com.zone rename to tests/test-data/test_configs/example.com.zone diff --git a/tests/test-data/named_test_configs/example.toml b/tests/test-data/test_configs/example.toml similarity index 100% rename from tests/test-data/named_test_configs/example.toml rename to tests/test-data/test_configs/example.toml diff --git a/tests/test-data/named_test_configs/example_forwarder.toml b/tests/test-data/test_configs/example_forwarder.toml similarity index 100% rename from tests/test-data/named_test_configs/example_forwarder.toml rename to tests/test-data/test_configs/example_forwarder.toml diff --git a/tests/test-data/named_test_configs/example_recursor.toml b/tests/test-data/test_configs/example_recursor.toml similarity index 100% rename from tests/test-data/named_test_configs/example_recursor.toml rename to tests/test-data/test_configs/example_recursor.toml diff --git a/tests/test-data/named_test_configs/include.example.com.zone b/tests/test-data/test_configs/include.example.com.zone similarity index 100% rename from tests/test-data/named_test_configs/include.example.com.zone rename to tests/test-data/test_configs/include.example.com.zone diff --git a/tests/test-data/named_test_configs/ipv4_and_ipv6.toml b/tests/test-data/test_configs/ipv4_and_ipv6.toml similarity index 100% rename from tests/test-data/named_test_configs/ipv4_and_ipv6.toml rename to tests/test-data/test_configs/ipv4_and_ipv6.toml diff --git a/tests/test-data/named_test_configs/ipv4_only.toml b/tests/test-data/test_configs/ipv4_only.toml similarity index 100% rename from tests/test-data/named_test_configs/ipv4_only.toml rename to tests/test-data/test_configs/ipv4_only.toml diff --git a/tests/test-data/named_test_configs/ipv6_only.toml b/tests/test-data/test_configs/ipv6_only.toml similarity index 100% rename from tests/test-data/named_test_configs/ipv6_only.toml rename to tests/test-data/test_configs/ipv6_only.toml diff --git a/tests/test-data/named_test_configs/openssl_dnssec.toml b/tests/test-data/test_configs/openssl_dnssec.toml similarity index 84% rename from tests/test-data/named_test_configs/openssl_dnssec.toml rename to tests/test-data/test_configs/openssl_dnssec.toml index ef7108c2..28213e1e 100644 --- a/tests/test-data/named_test_configs/openssl_dnssec.toml +++ b/tests/test-data/test_configs/openssl_dnssec.toml @@ -40,7 +40,7 @@ file = "example.com.zone" enable_dnssec = true [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/rsa_2048.pem" +key_path = "../tests/test-data/test_configs/dnssec/rsa_2048.pem" ## the password used to encrypt/decrypt the file (must be PEM), blank for none password = "123456" ## specify the algorithm @@ -53,19 +53,19 @@ is_zone_signing_key = true # create_if_absent = false [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/rsa_2048.pem" +key_path = "../tests/test-data/test_configs/dnssec/rsa_2048.pem" password = "123456" algorithm = "RSASHA512" is_zone_signing_key = true [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/ecdsa_p256.pem" +key_path = "../tests/test-data/test_configs/dnssec/ecdsa_p256.pem" # password = "123456" algorithm = "ECDSAP256SHA256" is_zone_signing_key = true [[zones.keys]] -key_path = "../tests/test-data/named_test_configs/dnssec/ecdsa_p384.pem" +key_path = "../tests/test-data/test_configs/dnssec/ecdsa_p384.pem" # password = "123456" algorithm = "ECDSAP384SHA384" is_zone_signing_key = true \ No newline at end of file diff --git a/tests/test-data/named_test_configs/ring_dnssec.toml b/tests/test-data/test_configs/ring_dnssec.toml similarity index 85% rename from tests/test-data/named_test_configs/ring_dnssec.toml rename to tests/test-data/test_configs/ring_dnssec.toml index d792ef5d..8b5628aa 100644 --- a/tests/test-data/named_test_configs/ring_dnssec.toml +++ b/tests/test-data/test_configs/ring_dnssec.toml @@ -41,18 +41,18 @@ enable_dnssec = true [[zones.keys]] # Requires --features=ring -key_path = "../tests/test-data/named_test_configs/dnssec/ecdsa_p256.pk8" +key_path = "../tests/test-data/test_configs/dnssec/ecdsa_p256.pk8" algorithm = "ECDSAP256SHA256" is_zone_signing_key = true [[zones.keys]] # Requires --features=ring -key_path = "../tests/test-data/named_test_configs/dnssec/ecdsa_p384.pk8" +key_path = "../tests/test-data/test_configs/dnssec/ecdsa_p384.pk8" algorithm = "ECDSAP384SHA384" is_zone_signing_key = true [[zones.keys]] # Requires --features=ring -key_path = "../tests/test-data/named_test_configs/dnssec/ed25519.pk8" +key_path = "../tests/test-data/test_configs/dnssec/ed25519.pk8" algorithm = "ED25519" is_zone_signing_key = true diff --git a/tests/test-data/named_test_configs/sec/example.cert b/tests/test-data/test_configs/sec/example.cert similarity index 100% rename from tests/test-data/named_test_configs/sec/example.cert rename to tests/test-data/test_configs/sec/example.cert diff --git a/tests/test-data/named_test_configs/sec/example.cert.pem b/tests/test-data/test_configs/sec/example.cert.pem similarity index 100% rename from tests/test-data/named_test_configs/sec/example.cert.pem rename to tests/test-data/test_configs/sec/example.cert.pem diff --git a/tests/test-data/named_test_configs/sec/example.key b/tests/test-data/test_configs/sec/example.key similarity index 100% rename from tests/test-data/named_test_configs/sec/example.key rename to tests/test-data/test_configs/sec/example.key diff --git a/tests/test-data/named_test_configs/sec/example.key.pem b/tests/test-data/test_configs/sec/example.key.pem similarity index 100% rename from tests/test-data/named_test_configs/sec/example.key.pem rename to tests/test-data/test_configs/sec/example.key.pem diff --git a/tests/test-data/named_test_configs/sec/example.p12 b/tests/test-data/test_configs/sec/example.p12 similarity index 100% rename from tests/test-data/named_test_configs/sec/example.p12 rename to tests/test-data/test_configs/sec/example.p12 diff --git a/tests/test-data/named_test_configs/sec/gen-keys.sh b/tests/test-data/test_configs/sec/gen-keys.sh similarity index 100% rename from tests/test-data/named_test_configs/sec/gen-keys.sh rename to tests/test-data/test_configs/sec/gen-keys.sh