libsnapshot: Fix test failure in CancelOnTargetSlot.
This test fails because CreateLogicalPartitions is effectively called
twice without unmapping anything.
Bug: 208944665
Test: run_snapshot_tests.sh
Change-Id: I7e79f43e8de2f79bb72888c4198a95d9bd76bcdd
diff --git a/fs_mgr/libsnapshot/snapshot_test.cpp b/fs_mgr/libsnapshot/snapshot_test.cpp
index f1d76e7..c3b2f78 100644
--- a/fs_mgr/libsnapshot/snapshot_test.cpp
+++ b/fs_mgr/libsnapshot/snapshot_test.cpp
@@ -2215,6 +2215,8 @@
TEST_F(SnapshotUpdateTest, CancelOnTargetSlot) {
AddOperationForPartitions();
+ ASSERT_TRUE(UnmapAll());
+
// Execute the update from B->A.
test_device->set_slot_suffix("_b");
ASSERT_TRUE(sm->BeginUpdate());