improve a test to understand what's going on with the ci

This commit is contained in:
Tamo 2023-09-11 14:23:57 +02:00
parent ddd34a488a
commit 08af69a33b

View File

@ -1,3 +1,4 @@
use std::path::PathBuf;
use std::time::Duration; use std::time::Duration;
use actix_rt::time::sleep; use actix_rt::time::sleep;
@ -154,6 +155,12 @@ async fn perform_on_demand_snapshot() {
let temp = tempfile::tempdir().unwrap(); let temp = tempfile::tempdir().unwrap();
let snapshots: Vec<String> = std::fs::read_dir(&snapshot_dir)
.unwrap()
.map(|entry| entry.unwrap().path().file_name().unwrap().to_str().unwrap().to_string())
.collect();
meili_snap::snapshot!(format!("{snapshots:?}"), @r###"["db.snapshot"]"###);
let snapshot_path = snapshot_dir.path().to_owned().join("db.snapshot"); let snapshot_path = snapshot_dir.path().to_owned().join("db.snapshot");
#[cfg_attr(windows, allow(unused))] #[cfg_attr(windows, allow(unused))]
let snapshot_meta = std::fs::metadata(&snapshot_path).unwrap(); let snapshot_meta = std::fs::metadata(&snapshot_path).unwrap();