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

Function test_load_config_in_dir

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

Source from the content-addressed store, hash-verified

120
121 #[test]
122 fn test_load_config_in_dir() {
123 let temp_dir = TempDir::new().unwrap();
124 let dir_path = temp_dir.path().to_str().unwrap();
125
126 fs::write(
127 temp_dir.path().join("test.json"),
128 r#"{"key": "json_value"}"#,
129 )
130 .unwrap();
131
132 let figment = Figment::new();
133 let result = load_config_in_dir("test", dir_path, false, figment);
134
135 assert_eq!(result.extract_inner::<String>("key").unwrap(), "json_value");
136 }
137
138 #[test]
139 fn test_search_load_config() {

Callers

nothing calls this directly

Calls 2

load_config_in_dirFunction · 0.85
pathMethod · 0.80

Tested by

no test coverage detected