Ignore some ConnectivityManagerTest CTS tests that can't be run in the instant app mode am: e7d085e87d

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/15068259

Change-Id: I20baa5a6730b594679ff558bbf218c478dda1517
This commit is contained in:
Frank Li
2021-06-23 05:45:41 +00:00
committed by Automerger Merge Worker

View File

@@ -698,6 +698,7 @@ public class ConnectivityManagerTest {
.build();
}
@AppModeFull(reason = "WRITE_SECURE_SETTINGS permission can't be granted to instant apps")
@Test @IgnoreUpTo(Build.VERSION_CODES.Q)
public void testIsPrivateDnsBroken() throws InterruptedException {
final String invalidPrivateDnsServer = "invalidhostname.example.com";
@@ -2202,7 +2203,7 @@ public class ConnectivityManagerTest {
* For specified apps, validate networks are prioritized in order: unmetered, TEST transport,
* default network.
*/
@AppModeFull(reason = "Cannot get WifiManager in instant app mode")
@AppModeFull(reason = "Instant apps cannot create test networks")
@Test
public void testSetOemNetworkPreferenceForTestPref() throws Exception {
// Cannot use @IgnoreUpTo(Build.VERSION_CODES.R) because this test also requires API 31
@@ -2262,6 +2263,7 @@ public class ConnectivityManagerTest {
* Verify that per-app OEM network preference functions as expected for network pref TEST_ONLY.
* For specified apps, validate that only TEST transport type networks are used.
*/
@AppModeFull(reason = "Instant apps cannot create test networks")
@Test
public void testSetOemNetworkPreferenceForTestOnlyPref() throws Exception {
// Cannot use @IgnoreUpTo(Build.VERSION_CODES.R) because this test also requires API 31