Cache config as a file

This commit is contained in:
Artur Jamro
2019-08-23 17:00:38 -07:00
committed by Dan Gohman
parent c42698dc85
commit 633dfa17ee
14 changed files with 530 additions and 201 deletions

View File

@@ -0,0 +1,12 @@
use tempfile;
use wasmtime_environ::cache_config;
#[test]
fn test_cache_write_default_config() {
let dir = tempfile::tempdir().expect("Can't create temporary directory");
let config_path = dir.path().join("cache-config.toml");
let errors = cache_config::init(true, Some(&config_path), true);
assert!(errors.is_empty());
assert!(config_path.exists());
}