summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHai Shalom <haishalom@google.com>2020-06-25 13:51:47 -0700
committerHai Shalom <haishalom@google.com>2020-06-26 10:21:49 -0700
commitf42caa9a7b9c6961af5b6bc75ab88c074ee6e4cc (patch)
tree356232ddfa64874c6df678f23dae6965a23e28ed /tests
parent6f1aafe2d4b979cf64ab7a5150a021f977cfed37 (diff)
[Passpoint] Add metrics to indicate OSU provisioned profile
Added a new boolean flag that indicates if the profile that is currently used for a connection was provisioned by an OSU server. Updated-PDD: TRUE Bug: 156117292 Test: atest WifiMetricsTest Test: dumpsys wifi Change-Id: Ia555f9791b15be06f4bc0765315ab34d261bcf07
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
index 198eb079f..4e895e488 100644
--- a/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/WifiMetricsTest.java
@@ -1762,10 +1762,11 @@ public class WifiMetricsTest extends WifiBaseTest {
assertEquals(1, mDecodedProto.connectionEvent.length);
assertEquals(WifiMetricsProto.ConnectionEvent.TYPE_OPEN,
mDecodedProto.connectionEvent[0].networkType);
+ assertFalse(mDecodedProto.connectionEvent[0].isOsuProvisioned);
}
/**
- * Verify the ConnectionEvent is labeled with networkType passpoint correctly.
+ * Verify the ConnectionEvent is labeled with networkType Passpoint correctly.
*/
@Test
public void testConnectionNetworkTypePasspoint() throws Exception {
@@ -1781,6 +1782,7 @@ public class WifiMetricsTest extends WifiBaseTest {
assertEquals(1, mDecodedProto.connectionEvent.length);
assertEquals(WifiMetricsProto.ConnectionEvent.TYPE_PASSPOINT,
mDecodedProto.connectionEvent[0].networkType);
+ assertFalse(mDecodedProto.connectionEvent[0].isOsuProvisioned);
}
/**
@@ -4995,4 +4997,26 @@ public class WifiMetricsTest extends WifiBaseTest {
assertEquals(2, mDecodedProto.carrierWifiMetrics.numConnectionAuthFailure);
assertEquals(3, mDecodedProto.carrierWifiMetrics.numConnectionNonAuthFailure);
}
+
+ /**
+ * Verify the ConnectionEvent is labeled with networkType Passpoint correctly and that the OSU
+ * provisioned flag is set to true.
+ */
+ @Test
+ public void testConnectionNetworkTypePasspointFromOsu() throws Exception {
+ WifiConfiguration config = WifiConfigurationTestUtil.createPasspointNetwork();
+ config.updateIdentifier = "7";
+ mWifiMetrics.startConnectionEvent(config, "RED",
+ WifiMetricsProto.ConnectionEvent.ROAM_NONE);
+ mWifiMetrics.endConnectionEvent(
+ WifiMetrics.ConnectionEvent.FAILURE_ASSOCIATION_TIMED_OUT,
+ WifiMetricsProto.ConnectionEvent.HLF_NONE,
+ WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN);
+ dumpProtoAndDeserialize();
+
+ assertEquals(1, mDecodedProto.connectionEvent.length);
+ assertEquals(WifiMetricsProto.ConnectionEvent.TYPE_PASSPOINT,
+ mDecodedProto.connectionEvent[0].networkType);
+ assertTrue(mDecodedProto.connectionEvent[0].isOsuProvisioned);
+ }
}