File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1615,7 +1615,6 @@ no_credentials = true
16151615
16161616#[ test]
16171617fn test_port_config ( ) {
1618- // just set up a config file with just port, then have it read it in, and ensure port is defined in the struct
16191618 const CONFIG_STR : & str = "port = 8080" ;
16201619 let file_config: FileConfig = toml:: from_str ( CONFIG_STR ) . expect ( "Is valid toml." ) ;
16211620 assert_eq ! (
@@ -1629,3 +1628,19 @@ fn test_port_config() {
16291628 }
16301629 )
16311630}
1631+
1632+ #[ test]
1633+ fn test_shutdown_config ( ) {
1634+ const CONFIG_STR : & str = "server_shutdown_timeout_ms = 10000" ;
1635+ let file_config: FileConfig = toml:: from_str ( CONFIG_STR ) . expect ( "Is valid toml." ) ;
1636+ assert_eq ! (
1637+ file_config,
1638+ FileConfig {
1639+ cache: Default :: default ( ) ,
1640+ dist: Default :: default ( ) ,
1641+ server_startup_timeout_ms: None ,
1642+ server_shutdown_timeout_ms: Some ( 10_000 ) ,
1643+ port: None ,
1644+ }
1645+ )
1646+ }
You can’t perform that action at this time.
0 commit comments