Skip to content
Snippets Groups Projects
Commit 3fb8aa09 authored by Victor Hsieh's avatar Victor Hsieh
Browse files

Switch placeholder app in test to another

I'm removing ApkVerityTestApp soon, so switch the placeholder app here
to another (instead of maintaining our own copy) from
frameworks/base/tests/FeatureSplit/.

Bug: 277916185
Test: atest BinaryTransparencyHostTest
Change-Id: Iac0a9bc52221f626fe0eeeadcfebc3ad96d356a3
parent 9fbfb01e
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ java_test_host {
data: [
":BinaryTransparencyTestApp",
":EasterEgg",
":FeatureSplitBase",
":FeatureSplit1",
":com.android.apex.cts.shim.v2_rebootless_prebuilt",
],
test_suites: [
......
......@@ -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");
}
}
......
......@@ -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
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment