Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c08fd359 authored by Yifan Hong's avatar Yifan Hong
Browse files

libsnapshot: Fix DataWipeRollbackInRecovery test

HandleImminentDataWipe left /metadata unmounted in recovery.
Test: run it

Change-Id: Ifc76203e46cf5e783d4badf7f8e3e8d0b78eaeb0
parent d120eba1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1284,6 +1284,8 @@ TEST_F(SnapshotUpdateTest, DataWipeRollbackInRecovery) {
    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));