From 50f007e0bda1f58fca3a8f58b464b7a2eb434771 Mon Sep 17 00:00:00 2001 From: utkarshg6 Date: Tue, 24 Sep 2024 16:26:28 +0530 Subject: [PATCH 1/3] GH-524: disable dns_socket_server --- node/src/server_initializer.rs | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/node/src/server_initializer.rs b/node/src/server_initializer.rs index 2f2c5f320..bc82c3914 100644 --- a/node/src/server_initializer.rs +++ b/node/src/server_initializer.rs @@ -42,12 +42,13 @@ impl ServerInitializer for ServerInitializerReal { let data_directory = value_m!(multi_config, "data-directory", String) .expect("ServerInitializer: Data directory not present in Multi Config"); + // TODO: GH-525: This card should bring back the commented out code for dns_socket_server let result: RunModeResult = Ok(()) - .combine_results( - self.dns_socket_server - .as_mut() - .initialize_as_privileged(&multi_config), - ) + // .combine_results( + // self.dns_socket_server + // .as_mut() + // .initialize_as_privileged(&multi_config), + // ) .combine_results( self.bootstrapper .as_mut() @@ -60,11 +61,11 @@ impl ServerInitializer for ServerInitializerReal { self.privilege_dropper.drop_privileges(&real_user); result - .combine_results( - self.dns_socket_server - .as_mut() - .initialize_as_unprivileged(&multi_config, streams), - ) + // .combine_results( + // self.dns_socket_server + // .as_mut() + // .initialize_as_unprivileged(&multi_config, streams), + // ) .combine_results( self.bootstrapper .as_mut() @@ -840,8 +841,8 @@ pub mod tests { [ bootstrapper_init_privileged_params_arc, bootstrapper_init_unprivileged_params_arc, - dns_socket_server_privileged_params_arc, - dns_socket_server_unprivileged_params_arc, + // dns_socket_server_privileged_params_arc, // TODO: GH-525: Fix me + // dns_socket_server_unprivileged_params_arc, ] .iter() .for_each(|arc_params| { @@ -889,12 +890,13 @@ pub mod tests { let result = subject.go(&mut holder.streams(), &args); + // TODO: GH-525: Fix me assert_eq!( result, Err(ConfiguratorError::new(vec![ - ParamError::new("dns-iap", "dns-iap-reason"), + // ParamError::new("dns-iap", "dns-iap-reason"), ParamError::new("boot-iap", "boot-iap-reason"), - ParamError::new("dns-iau", "dns-iau-reason"), + // ParamError::new("dns-iau", "dns-iau-reason"), ParamError::new("boot-iau", "boot-iau-reason") ])) ); From 718d2ff40128b67099597848c42392f163e7b442 Mon Sep 17 00:00:00 2001 From: Bert Date: Fri, 27 Sep 2024 11:51:13 +0200 Subject: [PATCH 2/3] GH-524: DNS disabled in ServerInitializerReal poll(); two integration tests put in ignore --- node/src/server_initializer.rs | 12 +++++++----- node/tests/dns_round_trip_test.rs | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/node/src/server_initializer.rs b/node/src/server_initializer.rs index bc82c3914..5cef4fb3c 100644 --- a/node/src/server_initializer.rs +++ b/node/src/server_initializer.rs @@ -28,6 +28,7 @@ use time::OffsetDateTime; use tokio::prelude::{Async, Future}; pub struct ServerInitializerReal { + #[allow(dead_code)] dns_socket_server: Box>, bootstrapper: Box>, privilege_dropper: Box, @@ -80,11 +81,12 @@ impl Future for ServerInitializerReal { type Error = (); fn poll(&mut self) -> Result::Item>, ::Error> { - try_ready!(self - .dns_socket_server - .as_mut() - .join(self.bootstrapper.as_mut()) - .poll()); + // try_ready!(self + // .dns_socket_server + // .as_mut() + // .join(self.bootstrapper.as_mut()) + // .poll()); + try_ready!(self.bootstrapper.as_mut().poll()); Ok(Async::Ready(())) } } diff --git a/node/tests/dns_round_trip_test.rs b/node/tests/dns_round_trip_test.rs index c3c82c297..7d32e0892 100644 --- a/node/tests/dns_round_trip_test.rs +++ b/node/tests/dns_round_trip_test.rs @@ -9,6 +9,8 @@ use trust_dns::op::{OpCode, ResponseCode}; use trust_dns::rr::{DNSClass, RecordType}; #[test] +// TODO This ignore should be lifted by GH-525 +#[ignore] #[serial(port53)] fn handles_two_consecutive_ipv4_dns_requests_integration() { let _node = utils::MASQNode::start_standard( @@ -25,6 +27,8 @@ fn handles_two_consecutive_ipv4_dns_requests_integration() { } #[test] +// TODO This ignore should be lifted by GH-525 +#[ignore] #[serial(port53)] fn handles_consecutive_heterogeneous_dns_requests_integration() { let _node = utils::MASQNode::start_standard( From 0e02fb9c9a5ea64f060dbd9544ba1d7fb3d87615 Mon Sep 17 00:00:00 2001 From: utkarshg6 Date: Fri, 27 Sep 2024 15:42:54 +0530 Subject: [PATCH 3/3] GH-525: remove should_panic from the test --- node/src/server_initializer.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/src/server_initializer.rs b/node/src/server_initializer.rs index 5cef4fb3c..ea288fdce 100644 --- a/node/src/server_initializer.rs +++ b/node/src/server_initializer.rs @@ -729,7 +729,8 @@ pub mod tests { } #[test] - #[should_panic(expected = "EntryDnsServerMock was instructed to panic")] + // TODO: GH-525: It should panic + // #[should_panic(expected = "EntryDnsServerMock was instructed to panic")] fn server_initializer_dns_socket_server_panics() { let bootstrapper = CrashTestDummy::new(CrashPoint::None, BootstrapperConfig::new()); let privilege_dropper = PrivilegeDropperMock::new();