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:
Rob Bradford
2019-07-16 10:34:28 +01:00
committed by Samuel Ortiz
parent 9a17871630
commit a50c54671c
3 changed files with 10 additions and 9 deletions

View File

@@ -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));
}
}