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

Function setup_test_files

load_config/src/lib.rs:80–91  ·  view source on GitHub ↗
(dir: &TempDir)

Source from the content-addressed store, hash-verified

78 use tempfile::TempDir;
79
80 fn setup_test_files(dir: &TempDir) -> (String, String) {
81 let json_path = dir.path().join("config.json");
82 let toml_path = dir.path().join("config.toml");
83
84 fs::write(&json_path, r#"{"test": "json_value"}"#).unwrap();
85 fs::write(&toml_path, r#"test = "toml_value""#).unwrap();
86
87 (
88 json_path.to_str().unwrap().to_string(),
89 toml_path.to_str().unwrap().to_string(),
90 )
91 }
92
93 #[test]
94 fn test_load_config_file_json() {

Calls 1

pathMethod · 0.80