@@ -512,7 +512,7 @@ impl NodeConfig {
512512
513513#[ cfg( test) ]
514514mod tests {
515- use std:: collections:: BTreeMap ;
515+ use std:: { collections:: BTreeMap , str :: FromStr } ;
516516
517517 use pretty_assertions:: assert_eq;
518518 use stackable_operator:: {
@@ -677,62 +677,6 @@ mod tests {
677677 ) ;
678678 }
679679
680- #[ test]
681- pub fn test_tls_on_http_port_enabled ( ) {
682- let node_config_tls_undefined = node_config ( TestConfig :: default ( ) ) ;
683-
684- let node_config_tls_enabled = node_config ( TestConfig {
685- config_settings : & [ ( "plugins.security.ssl.http.enabled" , "true" ) ] ,
686- ..TestConfig :: default ( )
687- } ) ;
688-
689- let node_config_tls_disabled = node_config ( TestConfig {
690- config_settings : & [ ( "plugins.security.ssl.http.enabled" , "false" ) ] ,
691- ..TestConfig :: default ( )
692- } ) ;
693-
694- assert ! ( node_config_tls_undefined. tls_on_http_port_enabled( ) ) ;
695- assert ! ( node_config_tls_enabled. tls_on_http_port_enabled( ) ) ;
696- assert ! ( !node_config_tls_disabled. tls_on_http_port_enabled( ) ) ;
697- }
698-
699- #[ test]
700- pub fn test_value_as_bool ( ) {
701- // boolean
702- assert_eq ! ( Some ( true ) , NodeConfig :: value_as_bool( & Value :: Bool ( true ) ) ) ;
703- assert_eq ! ( Some ( false ) , NodeConfig :: value_as_bool( & Value :: Bool ( false ) ) ) ;
704-
705- // valid strings
706- assert_eq ! (
707- Some ( true ) ,
708- NodeConfig :: value_as_bool( & Value :: String ( "true" . to_owned( ) ) )
709- ) ;
710- assert_eq ! (
711- Some ( false ) ,
712- NodeConfig :: value_as_bool( & Value :: String ( "false" . to_owned( ) ) )
713- ) ;
714-
715- // invalid strings
716- assert_eq ! (
717- None ,
718- NodeConfig :: value_as_bool( & Value :: String ( "True" . to_owned( ) ) )
719- ) ;
720-
721- // invalid types
722- assert_eq ! ( None , NodeConfig :: value_as_bool( & Value :: Null ) ) ;
723- assert_eq ! (
724- None ,
725- NodeConfig :: value_as_bool( & Value :: Number (
726- serde_json:: Number :: from_i128( 1 ) . expect( "should be a valid number" )
727- ) )
728- ) ;
729- assert_eq ! ( None , NodeConfig :: value_as_bool( & Value :: Array ( vec![ ] ) ) ) ;
730- assert_eq ! (
731- None ,
732- NodeConfig :: value_as_bool( & Value :: Object ( serde_json:: Map :: new( ) ) )
733- ) ;
734- }
735-
736680 #[ test]
737681 pub fn test_environment_variables ( ) {
738682 let node_config = node_config ( TestConfig {
0 commit comments