summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPeter Qiu <zqiu@google.com>2017-02-27 09:38:32 -0800
committerPeter Qiu <zqiu@google.com>2017-02-27 09:42:19 -0800
commitfc34ddb26c7b65bcf06d65325ec407186011a285 (patch)
treefef929e770933f0ede2b49bb7b425f44af863203 /tests
parent9432358b816df5530aed86d4107756854e5ac4f0 (diff)
hotspot2: do not verify against installed SIM at provider install time
The validation is only needed when attempting to match a provider to a network. This allows a Passpoint provider with SIM credential to be installed at the time when the SIM card is not installed. Bug: 35797905 Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh Change-Id: If27c7ebdedf2864757535530d9752e2b05430f1b
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java15
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java
index d47b65601..46815abf0 100644
--- a/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/hotspot2/PasspointManagerTest.java
@@ -402,7 +402,6 @@ public class PasspointManagerTest {
@Test
public void addRemoveProviderWithValidSimCredential() throws Exception {
PasspointConfiguration config = createTestConfigWithSimCredential();
- when(mSimAccessor.getMatchingImsis(TEST_IMSI_PARAM)).thenReturn(new ArrayList<String>());
PasspointProvider provider = createMockProvider(config);
when(mObjectFactory.makePasspointProvider(eq(config), eq(mWifiKeyStore),
eq(mSimAccessor), anyLong())).thenReturn(provider);
@@ -431,19 +430,6 @@ public class PasspointManagerTest {
}
/**
- * Verify that adding a provider with an invalid SIM credential (configured IMSI doesn't
- * match the IMSI of the installed SIM cards) will fail.
- *
- * @throws Exception
- */
- @Test
- public void addProviderWithValidSimCredentialWithInvalidIMSI() throws Exception {
- PasspointConfiguration config = createTestConfigWithSimCredential();
- when(mSimAccessor.getMatchingImsis(TEST_IMSI_PARAM)).thenReturn(null);
- assertFalse(mManager.addOrUpdateProvider(config));
- }
-
- /**
* Verify that adding a provider with the same base domain as the existing provider will
* succeed, and verify that the existing provider is replaced by the new provider with
* the new configuration.
@@ -454,7 +440,6 @@ public class PasspointManagerTest {
public void addProviderWithExistingConfig() throws Exception {
// Add a provider with the original configuration.
PasspointConfiguration origConfig = createTestConfigWithSimCredential();
- when(mSimAccessor.getMatchingImsis(TEST_IMSI_PARAM)).thenReturn(new ArrayList<String>());
PasspointProvider origProvider = createMockProvider(origConfig);
when(mObjectFactory.makePasspointProvider(eq(origConfig), eq(mWifiKeyStore),
eq(mSimAccessor), anyLong())).thenReturn(origProvider);