libsnapshot: Fix DataWipeRollbackInRecovery test
HandleImminentDataWipe left /metadata unmounted in recovery.
Test: run it
Change-Id: Ifc76203e46cf5e783d4badf7f8e3e8d0b78eaeb0
diff --git a/fs_mgr/libsnapshot/snapshot_test.cpp b/fs_mgr/libsnapshot/snapshot_test.cpp
index d7c69a6..12bf399 100644
--- a/fs_mgr/libsnapshot/snapshot_test.cpp
+++ b/fs_mgr/libsnapshot/snapshot_test.cpp
@@ -1284,6 +1284,8 @@
auto new_sm = SnapshotManager::NewForFirstStageMount(test_device);
ASSERT_TRUE(new_sm->HandleImminentDataWipe());
+ // Manually mount metadata so that we can call GetUpdateState() below.
+ MountMetadata();
EXPECT_EQ(new_sm->GetUpdateState(), UpdateState::Unverified);
EXPECT_TRUE(test_device->IsSlotUnbootable(1));
EXPECT_FALSE(test_device->IsSlotUnbootable(0));