Cache configuration documentation

This commit is contained in:
Artur Jamro
2019-09-12 15:45:14 -07:00
committed by Dan Gohman
parent 1c22211d57
commit dde1c6ba58
18 changed files with 1238 additions and 233 deletions

View File

@@ -1,12 +1,13 @@
use tempfile;
use wasmtime_environ::cache_init;
use wasmtime_environ::cache_create_new_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_init(true, Some(&config_path), true, None);
assert!(errors.is_empty());
let result = cache_create_new_config(Some(&config_path));
assert!(result.is_ok());
assert!(config_path.exists());
assert_eq!(config_path, result.unwrap());
}