use detee_shared::sgx::types::dtpm::{compress_directory, DtpmConfig}; #[test] fn dtpm_config_dir_support_test() { let file_path = "tests/fixtures/dtpm_config.yaml"; let unloaded_config = DtpmConfig::from_path(file_path).unwrap(); let loaded_config = unloaded_config.load_data().unwrap(); dbg!(&loaded_config); } #[test] fn test_compression() { // let file_path = "/Users/user/.cache/hunter/toolchain"; let file_path = "./tests"; let compressed_buff = compress_directory(file_path).unwrap(); let tmp_dir = tempfile::tempdir() .unwrap() .into_path() .to_string_lossy() .to_string(); dbg!(&tmp_dir); std::fs::write( format!("{}/{}", tmp_dir, "archive.tar.zst"), &compressed_buff, ) .unwrap(); }