MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / test_load_config_file_toml_nested

Function test_load_config_file_toml_nested

load_config/src/lib.rs:256–277  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254
255 #[test]
256 fn test_load_config_file_toml_nested() {
257 let temp_dir = TempDir::new().unwrap();
258 let (_, toml_path) = setup_test_files(&temp_dir);
259
260 // Write nested TOML configuration
261 fs::write(
262 &toml_path,
263 r#"
264[config]
265test = "nested_toml_value"
266"#,
267 )
268 .unwrap();
269
270 let figment = Figment::new();
271 let result = load_config_file(&toml_path, true, figment).select("config");
272
273 assert_eq!(
274 result.extract_inner::<String>("test").unwrap(),
275 "nested_toml_value"
276 );
277 }
278
279 #[test]
280 fn test_search_load_config_nested() {

Callers

nothing calls this directly

Calls 2

setup_test_filesFunction · 0.85
load_config_fileFunction · 0.85

Tested by

no test coverage detected