Commit Graph

6 Commits

Author SHA1 Message Date
Remi NGUYEN VAN
e347301890 Mark connectivity module tests as such
Add @ConnectivityModuleTest to tests for classes that are mainly used to
back the connectivity (tethering) module, in particular data classes.

This causes the test not to be run in NetworkStack/CaptivePortalLogin
MTS tests when the connectivity (tethering) module is not installed.
Skipping such tests is necessary in that configuration as they may test
behavior that is new in the latest update, and data classes backing the
connectivity module would not be affected by
NetworkStack/CaptivePortalLogin updates anyway.

Bug: 211075897
Test: atest CtsNetTestCasesLatestSdk
Change-Id: I6163cd998fc78765b903fdb7acd21e652bc711c9
2022-01-18 16:55:44 +09:00
Remi NGUYEN VAN
8bc36966d4 Do not verify field count in tests used in CTS
Tests in tests/common and tests/cts are run as part of CtsNetTestCases.
Many used assertFieldCountEquals in parceling/unparceling tests to
ensure that unexpected fields were not added, or that they were not
missed when testing parceling/unparceling.

However with many of the classes updatable through module updates, the
field count may change in the future, breaking CTS tests.

Stop checking for the field count, as it would break on module releases,
and its value is lower than the maintenance cost.

Bug: 205901761
Test: atest CtsNetTestCases
Change-Id: I79854741f7e834574d4825bb737ef507785310fe
2022-01-18 16:55:32 +09:00
Taras Antoshchuk
3bbbffe133 Revert "Revert "Unhide IpPrefix(InetAddress, int)""
This reverts commit 758ead6dd3.

Reason for revert: Re-landing changes not related to postsubmit failure

Change-Id: I2f705549d85af4ba45dc294e0a86d757490b1cd7
2021-12-19 11:54:56 +00:00
Ayush Sharma
758ead6dd3 Revert "Unhide IpPrefix(InetAddress, int)"
Revert "Add APIs that allow to exclude routes from VPN"

Revert "Suppress NewApi warnings for @SystemApi -> public APIs"

Revert "Add VpnServiceBuilderShim for VpnService.Builder"

Revert submission 1551943-vpn-impl

Reason for revert: <DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=mainline_modules_x86_64-userdebug&lkgb=8007224&lkbb=8008168&fkbb=8007902 >, bug b/210979001
Reverted Changes:
I0e7aa077a:Add VpnServiceBuilderShim for VpnService.Builder
Ib12f5ab39:Suppress NewApi warnings for @SystemApi -> public ...
I59b9185cf:Unhide RouteInfo#getType and related fields
Ie5b62b2b2:Unhide IpPrefix(InetAddress, int)
I993a32d40:Add CTS tests for exclude VPN routes APIs
Ib24b2d3fb:Suppress NewApi warnings for @SystemApi -> public ...
Ic3b10464a:Add APIs that allow to exclude routes from VPN

Change-Id: Id0c373fb042a98c1c68807acf7fcfe456520ebe2
BUG: 210979001
2021-12-16 14:40:13 +00:00
Taras Antoshchuk
a5a1b80222 Unhide IpPrefix(InetAddress, int)
Unhide IpPrefix constructor to allow its usage with the new
VpnService.Builder#excludeRoute(IpPrefix) method.

Bug: 186082280
Test: atest IpPrefixTest
Change-Id: Ie5b62b2b206def1be53a41219681b4a8bc06c1d2
2021-12-13 11:11:00 +01:00
Remi NGUYEN VAN
5ed250d90a Move net unit tests to packages/Connectivity
Move the tests together with packages/Connectivity code, so both can be
moved to packages/modules/Connectivity together.

Also reorganize unit tests in a unit/ directory, as other tests
(integration/, common/ etc.) have been added in tests/net since they
were created. This makes the directory structure consistent.

Test: atest FrameworksNetTests
Bug: 187814163
Merged-In: I254ffd1c08ec058d594b4ea55cbae5505f8497cc

Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
2021-05-13 08:30:33 +00:00