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

Function test_load_config_file_json_nested

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

Source from the content-addressed store, hash-verified

237
238 #[test]
239 fn test_load_config_file_json_nested() {
240 let temp_dir = TempDir::new().unwrap();
241 let (json_path, _) = setup_test_files(&temp_dir);
242
243 // Write nested JSON configuration
244 fs::write(&json_path, r#"{"config": {"test": "nested_json_value"}}"#).unwrap();
245
246 let figment = Figment::new();
247 let result = load_config_file(&json_path, true, figment).select("config");
248
249 assert_eq!(
250 result.extract_inner::<String>("test").unwrap(),
251 "nested_json_value"
252 );
253 }
254
255 #[test]
256 fn test_load_config_file_toml_nested() {

Callers

nothing calls this directly

Calls 2

setup_test_filesFunction · 0.85
load_config_fileFunction · 0.85

Tested by

no test coverage detected