Commit Graph

4 Commits

Author SHA1 Message Date
Mark Chien
0d18d18252 Revert "Add ACCESS_NETWORK_STATE to Tethering CTS"
This reverts commit 90255ef0a7.

Reason for revert: this change break TetheringCoverageTests which test whether guard with proper permission (ACCESS_NETWORK_STATE). Instead of adding permission to test, use runAsShell with ACCESS_NETWORK_STATE: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1699426/1/Tethering/tests/integration/src/android/net/EthernetTetheringTest.java

Bug: 187371740

Change-Id: Id8f27dce237ab34c1a735ce4678e661a6113377e
2021-05-13 17:44:05 +00:00
paulhu
90255ef0a7 Add ACCESS_NETWORK_STATE to Tethering CTS
Add ACCESS_NETWORK_STATE to Tethering CTS because tests call to
EthernetManager#isAvailable() which is enforcing permission check
now. Without ACCESS_NETWORK_STATE, some tests will fail by lack
of permission.

Bug: 174573778
Test: CtsTetheringTest
Change-Id: I735d98527c14c12fb0f2df536cda25fdd84152f1
Ignore-AOSP-First: Security vulnerability issue should not fix on
                   aosp branch.
2021-04-26 06:57:46 +00:00
paulhu
d1ebb1e348 Add TetheringCoverageTests
Bug: 148636687
Test: atest TetheringCoverageTests
      atest TetheringTests
      atest TetheringIntegrationTests
      atest NetworkStackTests
      atest CtsTetheringTest
Change-Id: I1f2a50f16894b05e988476520ba25baba0b60d88
2020-04-14 14:14:33 +00:00
Lorenzo Colitti
eb73310727 Add an Ethernet tethering test.
This test uses EthernetManager's ability to use test network
interfaces to test tethering. This provides a fairly realistic
integration test for Tethering and its callbacks, IpServer and
DhcpServer, and so on.

It is in a new integration/ directory under Tethering because I
didn't really know where to put it. It's fast enough to run in
presubmit, but it didn't seem to be appropriate to call it a
unit test, and in the future we could also use this test to do
some limited testing of real Ethernet tethering as well.

Bug: 150644681
Test: atest TetheringIntegrationTests:EthernetTetheringTest --rerun-until-failure 100
Merged-In: Ifcda70b73848b1fd4c26b031e53f0a6500cc93d4
Change-Id: Ifcda70b73848b1fd4c26b031e53f0a6500cc93d4
2020-03-27 11:39:50 +00:00