@@ -28,6 +28,7 @@ use time::OffsetDateTime;
28
28
use tokio:: prelude:: { Async , Future } ;
29
29
30
30
pub struct ServerInitializerReal {
31
+ #[ allow( dead_code) ]
31
32
dns_socket_server : Box < dyn ConfiguredByPrivilege < Item = ( ) , Error = ( ) > > ,
32
33
bootstrapper : Box < dyn ConfiguredByPrivilege < Item = ( ) , Error = ( ) > > ,
33
34
privilege_dropper : Box < dyn PrivilegeDropper > ,
@@ -42,12 +43,13 @@ impl ServerInitializer for ServerInitializerReal {
42
43
let data_directory = value_m ! ( multi_config, "data-directory" , String )
43
44
. expect ( "ServerInitializer: Data directory not present in Multi Config" ) ;
44
45
46
+ // TODO: GH-525: This card should bring back the commented out code for dns_socket_server
45
47
let result: RunModeResult = Ok ( ( ) )
46
- . combine_results (
47
- self . dns_socket_server
48
- . as_mut ( )
49
- . initialize_as_privileged ( & multi_config) ,
50
- )
48
+ // .combine_results(
49
+ // self.dns_socket_server
50
+ // .as_mut()
51
+ // .initialize_as_privileged(&multi_config),
52
+ // )
51
53
. combine_results (
52
54
self . bootstrapper
53
55
. as_mut ( )
@@ -60,11 +62,11 @@ impl ServerInitializer for ServerInitializerReal {
60
62
self . privilege_dropper . drop_privileges ( & real_user) ;
61
63
62
64
result
63
- . combine_results (
64
- self . dns_socket_server
65
- . as_mut ( )
66
- . initialize_as_unprivileged ( & multi_config, streams) ,
67
- )
65
+ // .combine_results(
66
+ // self.dns_socket_server
67
+ // .as_mut()
68
+ // .initialize_as_unprivileged(&multi_config, streams),
69
+ // )
68
70
. combine_results (
69
71
self . bootstrapper
70
72
. as_mut ( )
@@ -79,11 +81,12 @@ impl Future for ServerInitializerReal {
79
81
type Error = ( ) ;
80
82
81
83
fn poll ( & mut self ) -> Result < Async < <Self as Future >:: Item > , <Self as Future >:: Error > {
82
- try_ready ! ( self
83
- . dns_socket_server
84
- . as_mut( )
85
- . join( self . bootstrapper. as_mut( ) )
86
- . poll( ) ) ;
84
+ // try_ready!(self
85
+ // .dns_socket_server
86
+ // .as_mut()
87
+ // .join(self.bootstrapper.as_mut())
88
+ // .poll());
89
+ try_ready ! ( self . bootstrapper. as_mut( ) . poll( ) ) ;
87
90
Ok ( Async :: Ready ( ( ) ) )
88
91
}
89
92
}
@@ -726,7 +729,8 @@ pub mod tests {
726
729
}
727
730
728
731
#[ test]
729
- #[ should_panic( expected = "EntryDnsServerMock was instructed to panic" ) ]
732
+ // TODO: GH-525: It should panic
733
+ // #[should_panic(expected = "EntryDnsServerMock was instructed to panic")]
730
734
fn server_initializer_dns_socket_server_panics ( ) {
731
735
let bootstrapper = CrashTestDummy :: new ( CrashPoint :: None , BootstrapperConfig :: new ( ) ) ;
732
736
let privilege_dropper = PrivilegeDropperMock :: new ( ) ;
@@ -840,8 +844,8 @@ pub mod tests {
840
844
[
841
845
bootstrapper_init_privileged_params_arc,
842
846
bootstrapper_init_unprivileged_params_arc,
843
- dns_socket_server_privileged_params_arc,
844
- dns_socket_server_unprivileged_params_arc,
847
+ // dns_socket_server_privileged_params_arc, // TODO: GH-525: Fix me
848
+ // dns_socket_server_unprivileged_params_arc,
845
849
]
846
850
. iter ( )
847
851
. for_each ( |arc_params| {
@@ -889,12 +893,13 @@ pub mod tests {
889
893
890
894
let result = subject. go ( & mut holder. streams ( ) , & args) ;
891
895
896
+ // TODO: GH-525: Fix me
892
897
assert_eq ! (
893
898
result,
894
899
Err ( ConfiguratorError :: new( vec![
895
- ParamError :: new( "dns-iap" , "dns-iap-reason" ) ,
900
+ // ParamError::new("dns-iap", "dns-iap-reason"),
896
901
ParamError :: new( "boot-iap" , "boot-iap-reason" ) ,
897
- ParamError :: new( "dns-iau" , "dns-iau-reason" ) ,
902
+ // ParamError::new("dns-iau", "dns-iau-reason"),
898
903
ParamError :: new( "boot-iau" , "boot-iau-reason" )
899
904
] ) )
900
905
) ;
0 commit comments