Merge "Cleanup and refine connectivity test config"
This commit is contained in:
@@ -111,7 +111,10 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
// TODO: move to mainline-presubmit when known green.
|
// TODO: move to mainline-presubmit when known green.
|
||||||
// Test with connectivity/tethering module only, to catch integration issues with older versions of other modules
|
// Test with connectivity/tethering module only, to catch integration issues with older versions of other modules.
|
||||||
|
// "new tethering + old NetworkStack" is not a configuration that should really exist in the field, but
|
||||||
|
// there is no strong guarantee, and it is required by MTS testing for module qualification, where modules
|
||||||
|
// are tested independently.
|
||||||
{
|
{
|
||||||
"name": "CtsNetTestCasesLatestSdk[com.google.android.tethering.apex]",
|
"name": "CtsNetTestCasesLatestSdk[com.google.android.tethering.apex]",
|
||||||
"options": [
|
"options": [
|
||||||
@@ -160,9 +163,6 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "packages/modules/CaptivePortalLogin"
|
"path": "packages/modules/CaptivePortalLogin"
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "packages/modules/Connectivity/Tethering"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,7 +107,11 @@ public final class IpConfigurationTest {
|
|||||||
assertIpConfigurationEqual(ipConfig, new IpConfiguration(ipConfig));
|
assertIpConfigurationEqual(ipConfig, new IpConfiguration(ipConfig));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConnectivityModuleTest @DevSdkIgnoreRule.IgnoreUpTo(Build.VERSION_CODES.R)
|
@ConnectivityModuleTest // The builder was added in an S+ module update.
|
||||||
|
// This whole class is not skipped (marked @ConnectivityModuleTest) in MTS for non-connectivity
|
||||||
|
// modules like NetworkStack, as NetworkStack uses IpConfiguration a lot on Q+, so tests that
|
||||||
|
// cover older APIs are still useful to provide used API coverage for NetworkStack.
|
||||||
|
@DevSdkIgnoreRule.IgnoreUpTo(Build.VERSION_CODES.R)
|
||||||
@Test
|
@Test
|
||||||
public void testBuilder() {
|
public void testBuilder() {
|
||||||
final IpConfiguration c = new IpConfiguration.Builder()
|
final IpConfiguration c = new IpConfiguration.Builder()
|
||||||
|
|||||||
@@ -154,6 +154,10 @@ private fun Message(what: Int, arg1: Int, arg2: Int, obj: Any?) = Message.obtain
|
|||||||
// NetworkAgent is not updatable in R-, so this test does not need to be compatible with older
|
// NetworkAgent is not updatable in R-, so this test does not need to be compatible with older
|
||||||
// versions. NetworkAgent was also based on AsyncChannel before S so cannot be tested the same way.
|
// versions. NetworkAgent was also based on AsyncChannel before S so cannot be tested the same way.
|
||||||
@IgnoreUpTo(Build.VERSION_CODES.R)
|
@IgnoreUpTo(Build.VERSION_CODES.R)
|
||||||
|
// NetworkAgent is updated as part of the connectivity module, and running NetworkAgent tests in MTS
|
||||||
|
// for modules other than Connectivity does not provide much value. Only run them in connectivity
|
||||||
|
// module MTS, so the tests only need to cover the case of an updated NetworkAgent.
|
||||||
|
@ConnectivityModuleTest
|
||||||
class NetworkAgentTest {
|
class NetworkAgentTest {
|
||||||
private val LOCAL_IPV4_ADDRESS = InetAddresses.parseNumericAddress("192.0.2.1")
|
private val LOCAL_IPV4_ADDRESS = InetAddresses.parseNumericAddress("192.0.2.1")
|
||||||
private val REMOTE_IPV4_ADDRESS = InetAddresses.parseNumericAddress("192.0.2.2")
|
private val REMOTE_IPV4_ADDRESS = InetAddresses.parseNumericAddress("192.0.2.2")
|
||||||
@@ -466,7 +470,6 @@ class NetworkAgentTest {
|
|||||||
.addTransportType(TRANSPORT_TEST)
|
.addTransportType(TRANSPORT_TEST)
|
||||||
.setAccessUids(uids.toSet()).build()
|
.setAccessUids(uids.toSet()).build()
|
||||||
|
|
||||||
@ConnectivityModuleTest // Functionality was added post-S via connectivity module update
|
|
||||||
@Test
|
@Test
|
||||||
fun testRejectedUpdates() {
|
fun testRejectedUpdates() {
|
||||||
val callback = TestableNetworkCallback()
|
val callback = TestableNetworkCallback()
|
||||||
|
|||||||
Reference in New Issue
Block a user