summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2019-11-11 10:13:30 -0800
committerEtan Cohen <etancohen@google.com>2019-11-13 15:29:01 -0800
commit574c8d439ae7bc49d6134eb0ce9139c59b148c34 (patch)
tree3a79ee03f575ebba7895c3f068e91ac5626bded0 /tests
parent77f8ce94b89bae2a15ee1e7aab6d8c4fac19fcbd (diff)
[AWARE] Allow setPMK API
Allowing configuration of the PMK is required for any PK-based protocols which operate OOB. Bug: 143956273 Test: atest android.net.wifi.aware Test: test com.android.server.wifi.aware Test: ACTS DataPathTest:test_ib_solicited_active_pmk_specific Test: CtsVerifier Change-Id: I7ed84d7f97b1889fbbda92f3bf5203e2f2540b54
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java40
1 files changed, 0 insertions, 40 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java
index a488baf2a..29e782d16 100644
--- a/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/aware/WifiAwareDataPathStateManagerTest.java
@@ -181,9 +181,6 @@ public class WifiAwareDataPathStateManagerTest extends WifiBaseTest {
when(mMockPowerManager.isDeviceIdleMode()).thenReturn(false);
when(mMockPowerManager.isInteractive()).thenReturn(true);
- when(mPermissionsWrapperMock.getUidPermission(eq(Manifest.permission.CONNECTIVITY_INTERNAL),
- anyInt())).thenReturn(PackageManager.PERMISSION_GRANTED);
-
mDut.mDataPathMgr.mNwService = mMockNwMgt;
mDut.mDataPathMgr.mNiWrapper = mMockNetworkInterface;
}
@@ -277,43 +274,6 @@ public class WifiAwareDataPathStateManagerTest extends WifiBaseTest {
}
/**
- * Validate that trying to specify a PMK without permission results in failure.
- */
- @Test
- public void testDataPathPmkWithoutPermission() throws Exception {
- final int clientId = 123;
- final byte pubSubId = 55;
- final byte[] pmk = "01234567890123456789012345678901".getBytes();
- final int requestorId = 1341234;
- final byte[] peerDiscoveryMac = HexEncoding.decode("000102030405".toCharArray(), false);
-
- InOrder inOrder = inOrder(mMockNative, mMockCm, mMockCallback, mMockSessionCallback);
- InOrder inOrderM = inOrder(mAwareMetricsMock);
-
- when(mPermissionsWrapperMock.getUidPermission(eq(Manifest.permission.CONNECTIVITY_INTERNAL),
- anyInt())).thenReturn(PackageManager.PERMISSION_DENIED);
-
- // (0) initialize
- DataPathEndPointInfo res = initDataPathEndPoint(true, clientId, pubSubId, requestorId,
- peerDiscoveryMac, inOrder, inOrderM, false);
-
- // (1) request network
- NetworkRequest nr = getSessionNetworkRequest(clientId, res.mSessionId, res.mPeerHandle, pmk,
- null, false, 0);
-
- Message reqNetworkMsg = Message.obtain();
- reqNetworkMsg.what = NetworkFactory.CMD_REQUEST_NETWORK;
- reqNetworkMsg.obj = nr;
- reqNetworkMsg.arg1 = 0;
- res.mMessenger.send(reqNetworkMsg);
- mMockLooper.dispatchAll();
-
- // failure: no interactions with native manager
- verifyUnfullfillableDispatched(res.mReverseMessenger);
- verifyNoMoreInteractions(mMockNative, mMockCm, mAwareMetricsMock, mMockNwMgt);
- }
-
- /**
* Validate that trying to specify port info on subscriber results in failure.
*/
@Test