Ignore EXCLUDED_ROUTES LinkPropertiesTest up to S_V2

The platform doesn't allow overwriting compat flags that have target SDK
lower than the platform SDK in release build. Ignoring the test cases
that need compat flag overwrite up to S_V2 makes the MTS pass on S
device.

Bug: 296248982
Test: TH
Change-Id: Iab102725004c39b4dc3c0200c9bc673dd6be1302
This commit is contained in:
Yuyang Huang
2023-08-22 15:17:38 +09:00
parent cad1226991
commit 7fe61f4cbd

View File

@@ -1260,7 +1260,7 @@ public class LinkPropertiesTest {
assertFalse(lp.hasIpv4UnreachableDefaultRoute());
}
@Test @IgnoreUpTo(Build.VERSION_CODES.R)
@Test @IgnoreUpTo(Build.VERSION_CODES.S_V2)
@CtsNetTestCasesMaxTargetSdk31(reason = "Compat change cannot be overridden when targeting T+")
@EnableCompatChanges({ConnectivityCompatChanges.EXCLUDED_ROUTES})
public void testHasExcludeRoute() {
@@ -1273,7 +1273,7 @@ public class LinkPropertiesTest {
assertTrue(lp.hasExcludeRoute());
}
@Test @IgnoreUpTo(Build.VERSION_CODES.R)
@Test @IgnoreUpTo(Build.VERSION_CODES.S_V2)
@CtsNetTestCasesMaxTargetSdk31(reason = "Compat change cannot be overridden when targeting T+")
@EnableCompatChanges({ConnectivityCompatChanges.EXCLUDED_ROUTES})
public void testRouteAddWithSameKey() throws Exception {
@@ -1347,14 +1347,14 @@ public class LinkPropertiesTest {
assertExcludeRoutesVisible();
}
@Test @IgnoreUpTo(Build.VERSION_CODES.R)
@Test @IgnoreUpTo(Build.VERSION_CODES.S_V2)
@CtsNetTestCasesMaxTargetSdk31(reason = "Compat change cannot be overridden when targeting T+")
@EnableCompatChanges({ConnectivityCompatChanges.EXCLUDED_ROUTES})
public void testExcludedRoutesEnabledByCompatChange() {
assertExcludeRoutesVisible();
}
@Test @IgnoreUpTo(Build.VERSION_CODES.R)
@Test @IgnoreUpTo(Build.VERSION_CODES.S_V2)
@CtsNetTestCasesMaxTargetSdk31(reason = "Compat change cannot be overridden when targeting T+")
@DisableCompatChanges({ConnectivityCompatChanges.EXCLUDED_ROUTES})
public void testExcludedRoutesDisabledByCompatChange() {