This repository was archived by the owner on Jan 2, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-24
lines changed
Expand file tree Collapse file tree 2 files changed +7
-24
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ port = 3012
1010host = " 0.0.0.0"
1111tls = false
1212
13+ [general ]
14+ server_domain = " localhost"
15+
1316[general .database ]
1417max_connections = 20
1518database = " sonata"
Original file line number Diff line number Diff line change @@ -287,31 +287,11 @@ mod tests {
287287
288288 #[ test]
289289 fn test_sonata_config_init ( ) {
290- let toml_str = r#"
291- [api]
292- enabled = true
293- port = 3011
294- host = "0.0.0.0"
295- tls = false
290+ let toml_str =
291+ & std:: fs:: read_to_string ( format ! ( "{}/sonata.toml" , std:: env!( "CARGO_MANIFEST_DIR" ) ) )
292+ . unwrap ( ) ;
296293
297- [gateway]
298- enabled = true
299- port = 3012
300- host = "0.0.0.0"
301- tls = false
302-
303- [general]
304- log_level = "Trace"
305-
306- [general.database]
307- max_connections = 20
308- database = "sonata"
309- username = "sonata"
310- password = "sonata"
311- port = 5432
312- host = "localhost"
313- tls = "prefer"
314- "# ;
294+ let _config: SonataConfig = toml:: from_str ( & toml_str) . unwrap ( ) ;
315295
316296 // First init should succeed
317297 assert ! ( SonataConfig :: init( toml_str) . is_ok( ) ) ;
You can’t perform that action at this time.
0 commit comments