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

Commit 11326fac authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add tests for snapshot-deletion (4/n)"

parents 13ca4537 42c73d93
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -256,11 +256,19 @@ public class StagedRollbackTest extends BaseHostJUnit4Test {

    @Test
    public void testRollbackDataPolicy() throws Exception {
        List<String> before = getSnapshotDirectories("/data/misc_ce/0/rollback");

        runPhase("testRollbackDataPolicy_Phase1");
        getDevice().reboot();
        runPhase("testRollbackDataPolicy_Phase2");
        getDevice().reboot();
        runPhase("testRollbackDataPolicy_Phase3");

        // Verify snapshots are deleted after restoration
        List<String> after = getSnapshotDirectories("/data/misc_ce/0/rollback");
        // Only check directories newly created during the test
        after.removeAll(before);
        after.forEach(dir -> assertDirectoryIsEmpty(dir));
    }

    /**