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

Commit 1c7c0014 authored by Victor Hsieh's avatar Victor Hsieh Committed by Android (Google) Code Review
Browse files

Merge "Switch placeholder app in test to another" into main

parents a3594881 3fb8aa09
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ java_test_host {
    data: [
        ":BinaryTransparencyTestApp",
        ":EasterEgg",
        ":FeatureSplitBase",
        ":FeatureSplit1",
        ":com.android.apex.cts.shim.v2_rebootless_prebuilt",
    ],
    test_suites: [
+5 −5
Original line number Diff line number Diff line
@@ -91,20 +91,20 @@ public final class BinaryTransparencyHostTest extends BaseHostJUnit4Test {
    public void testCollectAllSilentInstalledMbaInfo() throws Exception {
        try {
            new InstallMultiple()
                .addFile("ApkVerityTestApp.apk")
                .addFile("ApkVerityTestAppSplit.apk")
                .addFile("FeatureSplitBase.apk")
                .addFile("FeatureSplit1.apk")
                .run();
            updatePreloadApp();
            assertNotNull(getDevice().getAppPackageInfo("com.android.apkverity"));
            assertNotNull(getDevice().getAppPackageInfo("com.android.test.split.feature"));
            assertNotNull(getDevice().getAppPackageInfo("com.android.egg"));

            assertTrue(getDevice().setProperty("debug.transparency.bg-install-apps",
                        "com.android.apkverity,com.android.egg"));
                        "com.android.test.split.feature,com.android.egg"));
            runDeviceTest("testCollectAllSilentInstalledMbaInfo");
        } finally {
            // No need to wait until job complete, since we can't verifying very meaningfully.
            cancelPendingJob();
            uninstallPackage("com.android.apkverity");
            uninstallPackage("com.android.test.split.feature");
            uninstallPackage("com.android.egg");
        }
    }
+2 −2
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ public class BinaryTransparencyTest {
        // Verify
        assertThat(appInfoList).isNotEmpty();  // because we just installed from the host side

        var expectedAppNames = Set.of("com.android.apkverity", "com.android.egg");
        var expectedAppNames = Set.of("com.android.test.split.feature", "com.android.egg");
        var actualAppNames = appInfoList.stream().map((appInfo) -> appInfo.packageName)
                .collect(Collectors.toList());
        assertThat(actualAppNames).containsAtLeastElementsIn(expectedAppNames);
@@ -141,6 +141,6 @@ public class BinaryTransparencyTest {
                }
            }
        }
        assertThat(actualSplitNames).containsExactly("feature_x");  // Name of ApkVerityTestAppSplit
        assertThat(actualSplitNames).containsExactly("feature1");  // Name of FeatureSplit1
    }
}