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

Commit b9a629c2 authored by David Anderson's avatar David Anderson
Browse files

libsnapshot: Remove disabled /metadata unmount test.

This test should really be run in recovery, but we don't really have any
way to run gtests in recovery. The corresponding C++ code is not really
complicated enough to warrant dependency injection.

Instead, let's remove this test and defer to functional testing of adb
sideload/wipe-during-merge.

Bug: 350715463
Test: N/A
Change-Id: Ic2d206ec51b4324a9570bbf75947236f7577def0
parent ac52c5f0
Loading
Loading
Loading
Loading
+0 −18
Original line number Diff line number Diff line
@@ -80,7 +80,6 @@ using android::fs_mgr::BlockDeviceInfo;
using android::fs_mgr::CreateLogicalPartitionParams;
using android::fs_mgr::DestroyLogicalPartition;
using android::fs_mgr::EnsurePathMounted;
using android::fs_mgr::EnsurePathUnmounted;
using android::fs_mgr::Extent;
using android::fs_mgr::Fstab;
using android::fs_mgr::GetPartitionGroupName;
@@ -2133,23 +2132,6 @@ TEST_F(MetadataMountedTest, Android) {
    EXPECT_TRUE(sm->CancelUpdate()) << "Metadata dir should never be unmounted in Android mode";
}

TEST_F(MetadataMountedTest, Recovery) {
    GTEST_SKIP() << "b/350715463";

    test_device->set_recovery(true);
    metadata_dir_ = test_device->GetMetadataDir();

    EXPECT_TRUE(android::fs_mgr::EnsurePathUnmounted(&fstab_, metadata_dir_));
    EXPECT_FALSE(IsMetadataMounted());

    auto device = sm->EnsureMetadataMounted();
    EXPECT_NE(nullptr, device);
    EXPECT_TRUE(IsMetadataMounted());

    device.reset();
    EXPECT_FALSE(IsMetadataMounted());
}

// Test that during a merge, we can wipe data in recovery.
TEST_F(SnapshotUpdateTest, MergeInRecovery) {
    // Execute the first update.