mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
qcow: Make unit tests pass
Rather than relying on shared memory for a temporary file for QCOW testing instead use tempfile crate to get a temporary file. The vector cache tests also need a trivial update after the refactor. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
9a17871630
commit
a50c54671c
@@ -178,8 +178,8 @@ mod tests {
|
||||
|
||||
// Check that three of the four items inserted are still there and that the most recently
|
||||
// inserted is one of them.
|
||||
let num_items = (0..=3).filter(|k| cache.contains_key(&k)).count();
|
||||
let num_items = (0..=3).filter(|k| cache.contains_key(*k)).count();
|
||||
assert_eq!(num_items, 3);
|
||||
assert!(cache.contains_key(&3));
|
||||
assert!(cache.contains_key(3));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user