blob: 222a505e8cfe3fba27830f4eb7519ba171c828ab [file] [log] [blame]
tturney1bdf77d2015-12-28 17:46:13 -08001#!/usr/bin/env python3.4
Ang Li73697b32015-12-03 00:41:53 +00002#
tturney1bdf77d2015-12-28 17:46:13 -08003# Copyright 2016 - The Android Open Source Project
Ang Li73697b32015-12-03 00:41:53 +00004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17import pprint
Ang Li8e767182015-12-09 17:29:24 -080018import random
Ang Li73697b32015-12-03 00:41:53 +000019import time
20
Ang Lic2d45212016-03-10 18:38:53 -080021from acts import asserts
Ang Li82522812016-06-02 13:57:21 -070022from acts import signals
Girish Moturu03a2e4d2017-06-12 10:46:51 +053023from acts.test_decorators import test_tracker_info
Xianyuan Jia63751fb2020-11-17 00:07:40 +000024from acts_contrib.test_utils.wifi import wifi_test_utils as wutils
25from acts_contrib.test_utils.wifi.WifiBaseTest import WifiBaseTest
Ang Lic2d45212016-03-10 18:38:53 -080026
Ang Lie8ed2b32015-12-11 12:30:20 -080027WifiEnums = wutils.WifiEnums
Ang Li73697b32015-12-03 00:41:53 +000028
29# EAP Macros
30EAP = WifiEnums.Eap
31EapPhase2 = WifiEnums.EapPhase2
Ang Li73697b32015-12-03 00:41:53 +000032# Enterprise Config Macros
33Ent = WifiEnums.Enterprise
Ang Li73697b32015-12-03 00:41:53 +000034
Ang Li73697b32015-12-03 00:41:53 +000035
Girish Moturuf1ce4202018-10-20 21:33:00 -070036class WifiEnterpriseTest(WifiBaseTest):
Xianyuan Jia97a865e2020-11-10 02:09:40 +000037
38 def __init__(self, configs):
39 super().__init__(configs)
40 self.enable_packet_log = True
41
Ang Li73697b32015-12-03 00:41:53 +000042 def setup_class(self):
Xianyuan Jia168103b2019-09-06 12:22:52 -070043 super().setup_class()
44
Ang Li73697b32015-12-03 00:41:53 +000045 self.dut = self.android_devices[0]
Ang Li8e767182015-12-09 17:29:24 -080046 wutils.wifi_test_device_init(self.dut)
Ang Li81549052016-06-09 18:51:14 -070047 # If running in a setup with attenuators, set attenuation on all
48 # channels to zero.
49 if getattr(self, "attenuators", []):
50 for a in self.attenuators:
51 a.set_atten(0)
Ang Li73697b32015-12-03 00:41:53 +000052 required_userparam_names = (
Ang Li81549052016-06-09 18:51:14 -070053 "ca_cert", "client_cert", "client_key", "passpoint_ca_cert",
54 "passpoint_client_cert", "passpoint_client_key", "eap_identity",
55 "eap_password", "invalid_ca_cert", "invalid_client_cert",
56 "invalid_client_key", "fqdn", "provider_friendly_name", "realm",
Girish Moturuf1ce4202018-10-20 21:33:00 -070057 "device_password", "ping_addr", "radius_conf_2g", "radius_conf_5g",
58 "radius_conf_pwd")
Ang Li5cd6d3c2016-02-01 11:29:14 -080059 self.unpack_userparams(required_userparam_names,
Ang Li82522812016-06-02 13:57:21 -070060 roaming_consortium_ids=None,
Jimmy Chen7baec622020-06-23 19:00:33 +080061 plmn=None,
62 ocsp=0)
Girish Moturuf1ce4202018-10-20 21:33:00 -070063
64 if "AccessPoint" in self.user_params:
65 self.legacy_configure_ap_and_start(
66 ent_network=True,
67 radius_conf_2g=self.radius_conf_2g,
68 radius_conf_5g=self.radius_conf_5g,
69 ent_network_pwd=True,
70 radius_conf_pwd=self.radius_conf_pwd,)
Xianyuan Jia97a865e2020-11-10 02:09:40 +000071 elif "OpenWrtAP" in self.user_params:
72 self.configure_openwrt_ap_and_start(
73 ent_network=True,
74 radius_conf_2g=self.radius_conf_2g,
75 radius_conf_5g=self.radius_conf_5g,
76 ent_network_pwd=True,
77 radius_conf_pwd=self.radius_conf_pwd,)
Girish Moturuf1ce4202018-10-20 21:33:00 -070078 self.ent_network_2g = self.ent_networks[0]["2g"]
79 self.ent_network_5g = self.ent_networks[0]["5g"]
80 self.ent_network_pwd = self.ent_networks_pwd[0]["2g"]
81
Ang Li73697b32015-12-03 00:41:53 +000082 # Default configs for EAP networks.
Ang Li82522812016-06-02 13:57:21 -070083 self.config_peap0 = {
Girish Moturu150d32f2017-02-14 12:27:07 -080084 Ent.EAP: int(EAP.PEAP),
Ang Li73697b32015-12-03 00:41:53 +000085 Ent.CA_CERT: self.ca_cert,
86 Ent.IDENTITY: self.eap_identity,
87 Ent.PASSWORD: self.eap_password,
Girish Moturu150d32f2017-02-14 12:27:07 -080088 Ent.PHASE2: int(EapPhase2.MSCHAPV2),
Girish Moturuf1ce4202018-10-20 21:33:00 -070089 WifiEnums.SSID_KEY: self.ent_network_5g[WifiEnums.SSID_KEY],
Jimmy Chen7baec622020-06-23 19:00:33 +080090 Ent.OCSP: self.ocsp,
Ang Li73697b32015-12-03 00:41:53 +000091 }
Ang Li82522812016-06-02 13:57:21 -070092 self.config_peap1 = dict(self.config_peap0)
Girish Moturuf1ce4202018-10-20 21:33:00 -070093 self.config_peap1[WifiEnums.SSID_KEY] = \
94 self.ent_network_2g[WifiEnums.SSID_KEY]
Ang Li73697b32015-12-03 00:41:53 +000095 self.config_tls = {
Girish Moturu150d32f2017-02-14 12:27:07 -080096 Ent.EAP: int(EAP.TLS),
Ang Li73697b32015-12-03 00:41:53 +000097 Ent.CA_CERT: self.ca_cert,
Girish Moturuf1ce4202018-10-20 21:33:00 -070098 WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
Ang Li73697b32015-12-03 00:41:53 +000099 Ent.CLIENT_CERT: self.client_cert,
100 Ent.PRIVATE_KEY_ID: self.client_key,
101 Ent.IDENTITY: self.eap_identity,
Jimmy Chen7baec622020-06-23 19:00:33 +0800102 Ent.OCSP: self.ocsp,
Ang Li73697b32015-12-03 00:41:53 +0000103 }
104 self.config_ttls = {
Girish Moturu150d32f2017-02-14 12:27:07 -0800105 Ent.EAP: int(EAP.TTLS),
Ang Li73697b32015-12-03 00:41:53 +0000106 Ent.CA_CERT: self.ca_cert,
107 Ent.IDENTITY: self.eap_identity,
108 Ent.PASSWORD: self.eap_password,
Girish Moturu150d32f2017-02-14 12:27:07 -0800109 Ent.PHASE2: int(EapPhase2.MSCHAPV2),
Girish Moturuf1ce4202018-10-20 21:33:00 -0700110 WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
Jimmy Chen7baec622020-06-23 19:00:33 +0800111 Ent.OCSP: self.ocsp,
Ang Li73697b32015-12-03 00:41:53 +0000112 }
Ang Li82522812016-06-02 13:57:21 -0700113 self.config_pwd = {
Girish Moturu150d32f2017-02-14 12:27:07 -0800114 Ent.EAP: int(EAP.PWD),
Ang Li82522812016-06-02 13:57:21 -0700115 Ent.IDENTITY: self.eap_identity,
116 Ent.PASSWORD: self.eap_password,
Girish Moturuf1ce4202018-10-20 21:33:00 -0700117 WifiEnums.SSID_KEY: self.ent_network_pwd[WifiEnums.SSID_KEY],
Ang Li82522812016-06-02 13:57:21 -0700118 }
Ang Li73697b32015-12-03 00:41:53 +0000119 self.config_sim = {
Girish Moturu150d32f2017-02-14 12:27:07 -0800120 Ent.EAP: int(EAP.SIM),
Girish Moturuf1ce4202018-10-20 21:33:00 -0700121 WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
Ang Li73697b32015-12-03 00:41:53 +0000122 }
Ang Li82522812016-06-02 13:57:21 -0700123 self.config_aka = {
Girish Moturu150d32f2017-02-14 12:27:07 -0800124 Ent.EAP: int(EAP.AKA),
Girish Moturuf1ce4202018-10-20 21:33:00 -0700125 WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
Ang Li82522812016-06-02 13:57:21 -0700126 }
127 self.config_aka_prime = {
Girish Moturu150d32f2017-02-14 12:27:07 -0800128 Ent.EAP: int(EAP.AKA_PRIME),
Girish Moturuf1ce4202018-10-20 21:33:00 -0700129 WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
Ang Li82522812016-06-02 13:57:21 -0700130 }
Ang Li73697b32015-12-03 00:41:53 +0000131
132 # Base config for passpoint networks.
133 self.config_passpoint = {
134 Ent.FQDN: self.fqdn,
135 Ent.FRIENDLY_NAME: self.provider_friendly_name,
136 Ent.REALM: self.realm,
137 Ent.CA_CERT: self.passpoint_ca_cert
138 }
Ang Li82522812016-06-02 13:57:21 -0700139 if self.plmn:
Ang Li73697b32015-12-03 00:41:53 +0000140 self.config_passpoint[Ent.PLMN] = self.plmn
Ang Li82522812016-06-02 13:57:21 -0700141 if self.roaming_consortium_ids:
Ang Li81549052016-06-09 18:51:14 -0700142 self.config_passpoint[
143 Ent.ROAMING_IDS] = self.roaming_consortium_ids
Ang Li73697b32015-12-03 00:41:53 +0000144
145 # Default configs for passpoint networks.
146 self.config_passpoint_tls = dict(self.config_tls)
147 self.config_passpoint_tls.update(self.config_passpoint)
148 self.config_passpoint_tls[Ent.CLIENT_CERT] = self.passpoint_client_cert
Ang Li81549052016-06-09 18:51:14 -0700149 self.config_passpoint_tls[
150 Ent.PRIVATE_KEY_ID] = self.passpoint_client_key
Ang Li73697b32015-12-03 00:41:53 +0000151 del self.config_passpoint_tls[WifiEnums.SSID_KEY]
152 self.config_passpoint_ttls = dict(self.config_ttls)
153 self.config_passpoint_ttls.update(self.config_passpoint)
154 del self.config_passpoint_ttls[WifiEnums.SSID_KEY]
155 # Set screen lock password so ConfigStore is unlocked.
Ang Lia9d188f2016-02-17 18:03:01 -0800156 self.dut.droid.setDevicePassword(self.device_password)
Ang Li73697b32015-12-03 00:41:53 +0000157
158 def teardown_class(self):
Ang Li8e767182015-12-09 17:29:24 -0800159 wutils.reset_wifi(self.dut)
Hsiu-Chang Chen3492edd2019-03-27 10:28:58 +0800160 self.dut.droid.disableDevicePassword(self.device_password)
Ang Lia9d188f2016-02-17 18:03:01 -0800161 self.dut.ed.clear_all_events()
Ang Li73697b32015-12-03 00:41:53 +0000162
163 def setup_test(self):
Xianyuan Jia97a865e2020-11-10 02:09:40 +0000164 super().setup_test()
Ang Lia9d188f2016-02-17 18:03:01 -0800165 self.dut.droid.wifiStartTrackingStateChange()
166 self.dut.droid.wakeLockAcquireBright()
167 self.dut.droid.wakeUpNow()
Ang Li8e767182015-12-09 17:29:24 -0800168 wutils.reset_wifi(self.dut)
Ang Lia9d188f2016-02-17 18:03:01 -0800169 self.dut.ed.clear_all_events()
Ang Li73697b32015-12-03 00:41:53 +0000170
171 def teardown_test(self):
Xianyuan Jia97a865e2020-11-10 02:09:40 +0000172 super().teardown_test()
Ang Lia9d188f2016-02-17 18:03:01 -0800173 self.dut.droid.wakeLockRelease()
174 self.dut.droid.goToSleepNow()
175 self.dut.droid.wifiStopTrackingStateChange()
Ang Li73697b32015-12-03 00:41:53 +0000176
177 """Helper Functions"""
178
179 def eap_negative_connect_logic(self, config, ad):
180 """Tries to connect to an enterprise network with invalid credentials
181 and expect a failure.
182
183 Args:
184 config: A dict representing an invalid EAP credential.
185
186 Returns:
187 True if connection failed as expected, False otherwise.
188 """
Ang Li82522812016-06-02 13:57:21 -0700189 with asserts.assert_raises(signals.TestFailure, extras=config):
Bindu Mahadev50374df2017-01-04 11:03:32 -0800190 verdict = wutils.wifi_connect(ad, config)
Ang Li82522812016-06-02 13:57:21 -0700191 asserts.explicit_pass("Connection failed as expected.")
Ang Li73697b32015-12-03 00:41:53 +0000192
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530193 def gen_negative_configs(self, config, neg_params):
Ang Li73697b32015-12-03 00:41:53 +0000194 """Generic function used to generate negative configs.
195
196 For all the valid configurations, if a param in the neg_params also
197 exists in a config, a copy of the config is made with an invalid value
198 of the param.
199
200 Args:
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530201 config: A valid configuration.
Ang Li73697b32015-12-03 00:41:53 +0000202 neg_params: A dict that has all the invalid values.
203
204 Returns:
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530205 An invalid configurations generated based on the valid
206 configuration. Each invalid configuration has a different invalid
Ang Li73697b32015-12-03 00:41:53 +0000207 field.
208 """
Girish Moturuc4a29842017-10-24 07:37:26 -0700209 negative_config = dict(config)
210 if negative_config in [self.config_sim, self.config_aka,
211 self.config_aka_prime]:
212 negative_config[WifiEnums.SSID_KEY] = 'wrong_hostapd_ssid'
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530213 for k, v in neg_params.items():
214 # Skip negative test for TLS's identity field since it's not
215 # used for auth.
216 if config[Ent.EAP] == EAP.TLS and k == Ent.IDENTITY:
217 continue
218 if k in config:
Girish Moturuc4a29842017-10-24 07:37:26 -0700219 negative_config[k] = v
220 negative_config["invalid_field"] = k
221 return negative_config
Ang Li73697b32015-12-03 00:41:53 +0000222
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530223 def gen_negative_eap_configs(self, config):
Ang Li73697b32015-12-03 00:41:53 +0000224 """Generates invalid configurations for different EAP authentication
225 types.
226
227 For all the valid EAP configurations, if a param that is part of the
228 authentication info exists in a config, a copy of the config is made
229 with an invalid value of the param.
230
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530231 Args:
232 A valid network configration
233
Ang Li73697b32015-12-03 00:41:53 +0000234 Returns:
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530235 An invalid EAP configuration.
Ang Li73697b32015-12-03 00:41:53 +0000236 """
237 neg_params = {
238 Ent.CLIENT_CERT: self.invalid_client_cert,
239 Ent.CA_CERT: self.invalid_ca_cert,
240 Ent.PRIVATE_KEY_ID: self.invalid_client_key,
241 Ent.IDENTITY: "fake_identity",
242 Ent.PASSWORD: "wrong_password"
243 }
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530244 return self.gen_negative_configs(config, neg_params)
Ang Li73697b32015-12-03 00:41:53 +0000245
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530246 def gen_negative_passpoint_configs(self, config):
Ang Li73697b32015-12-03 00:41:53 +0000247 """Generates invalid configurations for different EAP authentication
248 types with passpoint support.
249
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530250 Args:
251 A valid network configration
252
Ang Li73697b32015-12-03 00:41:53 +0000253 Returns:
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530254 An invalid EAP configuration with passpoint fields.
Ang Li73697b32015-12-03 00:41:53 +0000255 """
256 neg_params = {
257 Ent.CLIENT_CERT: self.invalid_client_cert,
258 Ent.CA_CERT: self.invalid_ca_cert,
259 Ent.PRIVATE_KEY_ID: self.invalid_client_key,
260 Ent.IDENTITY: "fake_identity",
261 Ent.PASSWORD: "wrong_password",
262 Ent.FQDN: "fake_fqdn",
263 Ent.REALM: "where_no_one_has_gone_before",
264 Ent.PLMN: "fake_plmn",
265 Ent.ROAMING_IDS: [1234567890, 9876543210]
266 }
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530267 return self.gen_negative_configs(config, neg_params)
Roshan Pius58916a32016-06-16 16:26:44 -0700268
269 def eap_connect_toggle_wifi(self,
270 config,
271 *args):
272 """Connects to an enterprise network, toggles wifi state and ensures
273 that the device reconnects.
274
275 This logic expect the enterprise network to have Internet access.
276
277 Args:
278 config: A dict representing a wifi enterprise configuration.
279 args: args to be passed to |wutils.eap_connect|.
280
281 Returns:
282 True if the connection is successful and Internet access works.
283 """
Roshan Pius58916a32016-06-16 16:26:44 -0700284 ad = args[0]
Bindu Mahadev50374df2017-01-04 11:03:32 -0800285 wutils.wifi_connect(ad, config)
286 wutils.toggle_wifi_and_wait_for_reconnection(ad, config, num_of_tries=5)
Roshan Pius58916a32016-06-16 16:26:44 -0700287
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530288 """ Tests """
Ang Li81549052016-06-09 18:51:14 -0700289
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530290 # EAP connect tests
291 """ Test connecting to enterprise networks of different authentication
Ang Li73697b32015-12-03 00:41:53 +0000292 types.
293
294 The authentication types tested are:
295 EAP-TLS
296 EAP-PEAP with different phase2 types.
297 EAP-TTLS with different phase2 types.
298
299 Procedures:
300 For each enterprise wifi network
301 1. Connect to the network.
302 2. Send a GET request to a website and check response.
303
304 Expect:
305 Successful connection and Internet access through the enterprise
306 networks.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530307 """
308 @test_tracker_info(uuid="4e720cac-ea17-4de7-a540-8dc7c49f9713")
309 def test_eap_connect_with_config_tls(self):
310 wutils.wifi_connect(self.dut, self.config_tls)
Ang Li73697b32015-12-03 00:41:53 +0000311
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530312 @test_tracker_info(uuid="10e3a5e9-0018-4162-a9fa-b41500f13340")
313 def test_eap_connect_with_config_pwd(self):
314 wutils.wifi_connect(self.dut, self.config_pwd)
315
316 @test_tracker_info(uuid="b4513f78-a1c4-427f-bfc7-2a6b3da714b5")
317 def test_eap_connect_with_config_sim(self):
318 wutils.wifi_connect(self.dut, self.config_sim)
319
320 @test_tracker_info(uuid="7d390e30-cb67-4b55-bf00-567adad2d9b0")
321 def test_eap_connect_with_config_aka(self):
322 wutils.wifi_connect(self.dut, self.config_aka)
323
324 @test_tracker_info(uuid="742f921b-27c3-4b68-a3ca-88e64fe79c1d")
325 def test_eap_connect_with_config_aka_prime(self):
326 wutils.wifi_connect(self.dut, self.config_aka_prime)
327
328 @test_tracker_info(uuid="d34e30f3-6ef6-459f-b47a-e78ed90ce4c6")
329 def test_eap_connect_with_config_ttls_none(self):
330 config = dict(self.config_ttls)
331 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
332 wutils.wifi_connect(self.dut, config)
333
334 @test_tracker_info(uuid="0dca3a15-472e-427c-8e06-4e38088ee973")
335 def test_eap_connect_with_config_ttls_pap(self):
336 config = dict(self.config_ttls)
337 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
338 wutils.wifi_connect(self.dut, config)
339
340 @test_tracker_info(uuid="47c4b459-2cb1-4fc7-b4e7-82534e8e090e")
341 def test_eap_connect_with_config_ttls_mschap(self):
342 config = dict(self.config_ttls)
343 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
344 wutils.wifi_connect(self.dut, config)
345
346 @test_tracker_info(uuid="fdb286c7-8069-481d-baf0-c5dd7a31ff03")
347 def test_eap_connect_with_config_ttls_mschapv2(self):
348 config = dict(self.config_ttls)
349 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
350 wutils.wifi_connect(self.dut, config)
351
352 @test_tracker_info(uuid="d9315962-7987-4ee7-905d-6972c78ce8a1")
353 def test_eap_connect_with_config_ttls_gtc(self):
354 config = dict(self.config_ttls)
355 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
356 wutils.wifi_connect(self.dut, config)
357
358 @test_tracker_info(uuid="90a67bd3-30da-4daf-8ab0-d964d7ad19be")
359 def test_eap_connect_with_config_peap0_mschapv2(self):
360 config = dict(self.config_peap0)
361 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
362 wutils.wifi_connect(self.dut, config)
363
364 @test_tracker_info(uuid="3c451ba4-0c83-4eef-bc95-db4c21893008")
365 def test_eap_connect_with_config_peap0_gtc(self):
366 config = dict(self.config_peap0)
367 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
368 wutils.wifi_connect(self.dut, config)
369
370 @test_tracker_info(uuid="6b45157d-0325-417a-af18-11af5d240d79")
371 def test_eap_connect_with_config_peap1_mschapv2(self):
372 config = dict(self.config_peap1)
373 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
374 wutils.wifi_connect(self.dut, config)
375
376 @test_tracker_info(uuid="1663decc-71ae-4f95-a027-8a6dbf9c337f")
377 def test_eap_connect_with_config_peap1_gtc(self):
378 config = dict(self.config_peap1)
379 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
380 wutils.wifi_connect(self.dut, config)
381
382 # EAP connect negative tests
383 """ Test connecting to enterprise networks.
Ang Li73697b32015-12-03 00:41:53 +0000384
385 Procedures:
386 For each enterprise wifi network
387 1. Connect to the network with invalid credentials.
388
389 Expect:
390 Fail to establish connection.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530391 """
392 @test_tracker_info(uuid="b2a91f1f-ccd7-4bd1-ab81-19aab3d8ee38")
393 def test_eap_connect_negative_with_config_tls(self):
394 config = self.gen_negative_eap_configs(self.config_tls)
395 self.eap_negative_connect_logic(config, self.dut)
Ang Li81549052016-06-09 18:51:14 -0700396
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530397 @test_tracker_info(uuid="6466abde-1d16-4168-9dd8-1e7a0a19889b")
398 def test_eap_connect_negative_with_config_pwd(self):
399 config = self.gen_negative_eap_configs(self.config_pwd)
400 self.eap_negative_connect_logic(config, self.dut)
Ang Li81549052016-06-09 18:51:14 -0700401
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530402 @test_tracker_info(uuid="d7742a2a-85b0-409a-99d8-47711ddc5612")
403 def test_eap_connect_negative_with_config_sim(self):
404 config = self.gen_negative_eap_configs(self.config_sim)
405 self.eap_negative_connect_logic(config, self.dut)
Ang Li73697b32015-12-03 00:41:53 +0000406
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530407 @test_tracker_info(uuid="0ec0de93-cab3-4f41-960b-c0af64ff48c4")
408 def test_eap_connect_negative_with_config_aka(self):
409 config = self.gen_negative_eap_configs(self.config_aka)
410 self.eap_negative_connect_logic(config, self.dut)
411
412 @test_tracker_info(uuid="bb640ea4-32a6-48ea-87c9-f7128fffbbf6")
413 def test_eap_connect_negative_with_config_aka_prime(self):
414 config = self.gen_negative_eap_configs(self.config_aka_prime)
415 self.eap_negative_connect_logic(config, self.dut)
416
417 @test_tracker_info(uuid="86336ada-0ced-45a4-8a22-c4aa23c81111")
418 def test_eap_connect_negative_with_config_ttls_none(self):
419 config = dict(self.config_ttls)
420 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
421 config = self.gen_negative_eap_configs(config)
422 self.eap_negative_connect_logic(config, self.dut)
423
424 @test_tracker_info(uuid="71e0498d-9973-4958-94bd-79051c328920")
425 def test_eap_connect_negative_with_config_ttls_pap(self):
426 config = dict(self.config_ttls)
427 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
428 config = self.gen_negative_eap_configs(config)
429 self.eap_negative_connect_logic(config, self.dut)
430
431 @test_tracker_info(uuid="c04142a8-b204-4d2d-98dc-150b16c8397e")
432 def test_eap_connect_negative_with_config_ttls_mschap(self):
433 config = dict(self.config_ttls)
434 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
435 config = self.gen_negative_eap_configs(config)
436 self.eap_negative_connect_logic(config, self.dut)
437
438 @test_tracker_info(uuid="625e7aa5-e3e6-4bbe-98c0-5aad8ca1555b")
439 def test_eap_connect_negative_with_config_ttls_mschapv2(self):
440 config = dict(self.config_ttls)
441 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
442 config = self.gen_negative_eap_configs(config)
443 self.eap_negative_connect_logic(config, self.dut)
444
445 @test_tracker_info(uuid="24ea0d80-0a3f-41c2-8e05-d6387e589058")
446 def test_eap_connect_negative_with_config_ttls_gtc(self):
447 config = dict(self.config_ttls)
448 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
449 config = self.gen_negative_eap_configs(config)
450 self.eap_negative_connect_logic(config, self.dut)
451
452 @test_tracker_info(uuid="b7c1f0f8-6338-4501-8e1d-c9b136aaba88")
453 def test_eap_connect_negative_with_config_peap0_mschapv2(self):
454 config = dict(self.config_peap0)
455 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
456 config = self.gen_negative_eap_configs(config)
457 self.eap_negative_connect_logic(config, self.dut)
458
459 @test_tracker_info(uuid="9cf83dcb-38ad-4f75-9ea9-98de1cfaf7f3")
460 def test_eap_connect_negative_with_config_peap0_gtc(self):
461 config = dict(self.config_peap0)
462 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
463 config = self.gen_negative_eap_configs(config)
464 self.eap_negative_connect_logic(config, self.dut)
465
466 @test_tracker_info(uuid="89bb2b6b-d073-402a-bdc1-68ac5f8752a3")
467 def test_eap_connect_negative_with_config_peap1_mschapv2(self):
468 config = dict(self.config_peap1)
469 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
470 config = self.gen_negative_eap_configs(config)
471 self.eap_negative_connect_logic(config, self.dut)
472
473 @test_tracker_info(uuid="2252a864-9ff7-43b5-82d9-afe57d1f5e5f")
474 def test_eap_connect_negative_with_config_peap1_gtc(self):
475 config = dict(self.config_peap1)
476 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
477 config = self.gen_negative_eap_configs(config)
478 self.eap_negative_connect_logic(config, self.dut)
479
480 # EAP connect config store tests
481 """ Test connecting to enterprise networks of different authentication
Roshan Pius58916a32016-06-16 16:26:44 -0700482 types after wifi toggle.
483
484 The authentication types tested are:
485 EAP-TLS
486 EAP-PEAP with different phase2 types.
487 EAP-TTLS with different phase2 types.
488
489 Procedures:
490 For each enterprise wifi network
491 1. Connect to the network.
492 2. Send a GET request to a website and check response.
493 3. Toggle wifi.
494 4. Ensure that the device reconnects to the same network.
495
496 Expect:
497 Successful connection and Internet access through the enterprise
498 networks.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530499 """
500 @test_tracker_info(uuid="2a933b7f-27d7-4201-a34f-25b9d8072a8c")
501 def test_eap_connect_config_store_with_config_tls(self):
502 self.eap_connect_toggle_wifi(self.config_tls, self.dut)
Roshan Pius58916a32016-06-16 16:26:44 -0700503
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530504 @test_tracker_info(uuid="08dc071b-9fea-408a-a3f6-d3493869f6d4")
505 def test_eap_connect_config_store_with_config_pwd(self):
506 self.eap_connect_toggle_wifi(self.config_pwd, self.dut)
507
508 @test_tracker_info(uuid="230cb03e-58bc-41cb-b9b3-7215c2ab2325")
509 def test_eap_connect_config_store_with_config_sim(self):
510 self.eap_connect_toggle_wifi(self.config_sim, self.dut)
511
512 @test_tracker_info(uuid="dfc3e59c-2309-4598-8c23-bb3fe95ef89f")
513 def test_eap_connect_config_store_with_config_aka(self):
514 self.eap_connect_toggle_wifi(self.config_aka, self.dut)
515
516 @test_tracker_info(uuid="6050a1d1-4f3a-476d-bf93-638abd066790")
517 def test_eap_connect_config_store_with_config_aka_prime(self):
518 self.eap_connect_toggle_wifi(self.config_aka_prime, self.dut)
519
520 @test_tracker_info(uuid="03108057-cc44-4a80-8331-77c93694099c")
521 def test_eap_connect_config_store_with_config_ttls_none(self):
522 config = dict(self.config_ttls)
523 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
524 self.eap_connect_toggle_wifi(config, self.dut)
525
526 @test_tracker_info(uuid="53dd8195-e272-4589-a261-b8fa3607ad8d")
527 def test_eap_connect_config_store_with_config_ttls_pap(self):
528 config = dict(self.config_ttls)
529 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
530 self.eap_connect_toggle_wifi(config, self.dut)
531
532 @test_tracker_info(uuid="640f697b-9c62-4b19-bd76-53b236a152e0")
533 def test_eap_connect_config_store_with_config_ttls_mschap(self):
534 config = dict(self.config_ttls)
535 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
536 self.eap_connect_toggle_wifi(config, self.dut)
537
538 @test_tracker_info(uuid="f0243684-fae0-46f3-afbd-bf525fc712e2")
539 def test_eap_connect_config_store_with_config_ttls_mschapv2(self):
540 config = dict(self.config_ttls)
541 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
542 self.eap_connect_toggle_wifi(config, self.dut)
543
544 @test_tracker_info(uuid="49ec7202-3b00-49c3-970a-201360888c74")
545 def test_eap_connect_config_store_with_config_ttls_gtc(self):
546 config = dict(self.config_ttls)
547 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
548 self.eap_connect_toggle_wifi(config, self.dut)
549
550 @test_tracker_info(uuid="1c6abfa3-f344-4e28-b891-5481ab79efcf")
551 def test_eap_connect_config_store_with_config_peap0_mschapv2(self):
552 config = dict(self.config_peap0)
553 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
554 self.eap_connect_toggle_wifi(config, self.dut)
555
556 @test_tracker_info(uuid="2815bc76-49fa-43a5-a4b6-84788f9809d5")
557 def test_eap_connect_config_store_with_config_peap0_gtc(self):
558 config = dict(self.config_peap0)
559 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
560 self.eap_connect_toggle_wifi(config, self.dut)
561
562 @test_tracker_info(uuid="e93f7472-6895-4e36-bff2-9b2dcfd07ad0")
563 def test_eap_connect_config_store_with_config_peap1_mschapv2(self):
564 config = dict(self.config_peap1)
565 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
566 self.eap_connect_toggle_wifi(config, self.dut)
567
568 @test_tracker_info(uuid="6da72fa0-b858-4475-9559-46fe052d0d64")
569 def test_eap_connect_config_store_with_config_peap1_gtc(self):
570 config = dict(self.config_peap1)
571 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
572 self.eap_connect_toggle_wifi(config, self.dut)
573
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700574 # Removing 'test_' for all passpoint based testcases as we want to disable
575 # them. Adding the valid test cases to self.tests make them run in serial
576 # (TODO): gmoturu - Update the passpoint tests to test the valid scenario
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530577 # Passpoint connect tests
578 """ Test connecting to enterprise networks of different authentication
Ang Li73697b32015-12-03 00:41:53 +0000579 types with passpoint support.
580
581 The authentication types tested are:
582 EAP-TLS
583 EAP-TTLS with MSCHAPV2 as phase2.
584
585 Procedures:
586 For each enterprise wifi network
587 1. Connect to the network.
588 2. Send a GET request to a website and check response.
589
590 Expect:
591 Successful connection and Internet access through the enterprise
592 networks with passpoint support.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530593 """
594 @test_tracker_info(uuid="0b942524-bde9-4fc6-ac6a-fef1c247cb8e")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700595 def passpoint_connect_with_config_passpoint_tls(self):
Ang Lic2d45212016-03-10 18:38:53 -0800596 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530597 "Passpoint is not supported on %s" % self.dut.model)
598 wutils.wifi_connect(self.dut, self.config_passpoint_tls)
Ang Li73697b32015-12-03 00:41:53 +0000599
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530600 @test_tracker_info(uuid="33a014aa-99e7-4612-b732-54fabf1bf922")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700601 def passpoint_connect_with_config_passpoint_ttls_none(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530602 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
603 "Passpoint is not supported on %s" % self.dut.model)
604 config = dict(self.config_passpoint_ttls)
605 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
606 wutils.wifi_connect(self.dut, config)
607
608 @test_tracker_info(uuid="1aba8bf9-2b09-4956-b418-c3f4dadab330")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700609 def passpoint_connect_with_config_passpoint_ttls_pap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530610 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
611 "Passpoint is not supported on %s" % self.dut.model)
612 config = dict(self.config_passpoint_ttls)
613 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
614 wutils.wifi_connect(self.dut, config)
615
616 @test_tracker_info(uuid="cd978fc9-a393-4b1e-bba3-1efc52224500")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700617 def passpoint_connect_with_config_passpoint_ttls_mschap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530618 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
619 "Passpoint is not supported on %s" % self.dut.model)
620 config = dict(self.config_passpoint_ttls)
621 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
622 wutils.wifi_connect(self.dut, config)
623
624 @test_tracker_info(uuid="bc311ee7-ba64-4c76-a629-b916701bf6a5")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700625 def passpoint_connect_with_config_passpoint_ttls_mschapv2(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530626 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
627 "Passpoint is not supported on %s" % self.dut.model)
628 config = dict(self.config_passpoint_ttls)
629 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
630 wutils.wifi_connect(self.dut, config)
631
632 @test_tracker_info(uuid="357e5162-5081-4149-bedd-ef2c0f88b97e")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700633 def passpoint_connect_with_config_passpoint_ttls_gtc(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530634 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
635 "Passpoint is not supported on %s" % self.dut.model)
636 config = dict(self.config_passpoint_ttls)
637 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
638 wutils.wifi_connect(self.dut, config)
639
640 # Passpoint connect negative tests
641 """ Test connecting to enterprise networks.
Ang Li73697b32015-12-03 00:41:53 +0000642
643 Procedures:
644 For each enterprise wifi network
645 1. Connect to the network with invalid credentials.
646
647 Expect:
648 Fail to establish connection.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530649 """
650 @test_tracker_info(uuid="7b6b44a0-ff70-49b4-94ca-a98bedc18f92")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700651 def passpoint_connect_negative_with_config_passpoint_tls(self):
Ang Lic2d45212016-03-10 18:38:53 -0800652 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530653 "Passpoint is not supported on %s" % self.dut.model)
654 config = self.gen_negative_passpoint_configs(self.config_passpoint_tls)
655 self.eap_negative_connect_logic(config, self.dut)
Ang Li81549052016-06-09 18:51:14 -0700656
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530657 @test_tracker_info(uuid="3dbde40a-e88c-4166-b932-163663a10a41")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700658 def passpoint_connect_negative_with_config_passpoint_ttls_none(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530659 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
660 "Passpoint is not supported on %s" % self.dut.model)
661 config = dict(self.config_passpoint_ttls)
662 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
663 config = self.gen_negative_passpoint_configs(config)
664 self.eap_negative_connect_logic(config, self.dut)
Ang Li81549052016-06-09 18:51:14 -0700665
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530666 @test_tracker_info(uuid="8ee22ad6-d561-4ca2-a808-9f372fce56b4")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700667 def passpoint_connect_negative_with_config_passpoint_ttls_pap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530668 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
669 "Passpoint is not supported on %s" % self.dut.model)
670 config = dict(self.config_passpoint_ttls)
671 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
672 config = self.gen_negative_passpoint_configs(config)
673 self.eap_negative_connect_logic(config, self.dut)
Roshan Pius58916a32016-06-16 16:26:44 -0700674
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530675 @test_tracker_info(uuid="db5cefe7-9cb8-47a6-8635-006c80b97012")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700676 def passpoint_connect_negative_with_config_passpoint_ttls_mschap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530677 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
678 "Passpoint is not supported on %s" % self.dut.model)
679 config = dict(self.config_passpoint_ttls)
680 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
681 config = self.gen_negative_passpoint_configs(config)
682 self.eap_negative_connect_logic(config, self.dut)
683
684 @test_tracker_info(uuid="8f49496e-80df-48ce-9c51-42f0c6b81aff")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700685 def passpoint_connect_negative_with_config_passpoint_ttls_mschapv2(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530686 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
687 "Passpoint is not supported on %s" % self.dut.model)
688 config = dict(self.config_passpoint_ttls)
689 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
690 config = self.gen_negative_passpoint_configs(config)
691 self.eap_negative_connect_logic(config, self.dut)
692
693 @test_tracker_info(uuid="6561508f-598e-408d-96b6-15b631664be6")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700694 def passpoint_connect_negative_with_config_passpoint_ttls_gtc(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530695 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
696 "Passpoint is not supported on %s" % self.dut.model)
697 config = dict(self.config_passpoint_ttls)
698 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
699 config = self.gen_negative_passpoint_configs(config)
700 self.eap_negative_connect_logic(config, self.dut)
701
702 # Passpoint connect config store tests
703 """ Test connecting to enterprise networks of different authentication
Roshan Pius58916a32016-06-16 16:26:44 -0700704 types with passpoint support after wifi toggle.
705
706 The authentication types tested are:
707 EAP-TLS
708 EAP-TTLS with MSCHAPV2 as phase2.
709
710 Procedures:
711 For each enterprise wifi network
712 1. Connect to the network.
713 2. Send a GET request to a website and check response.
714 3. Toggle wifi.
715 4. Ensure that the device reconnects to the same network.
716
717 Expect:
718 Successful connection and Internet access through the enterprise
719 networks with passpoint support.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530720 """
721 @test_tracker_info(uuid="5d5e6bb0-faea-4a6e-a6bc-c87de997a4fd")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700722 def passpoint_connect_config_store_with_config_passpoint_tls(self):
Roshan Pius58916a32016-06-16 16:26:44 -0700723 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530724 "Passpoint is not supported on %s" % self.dut.model)
725 self.eap_connect_toggle_wifi(self.config_passpoint_tls, self.dut)
726
727 @test_tracker_info(uuid="0c80262d-23c1-439f-ad64-7b8ada5d1962")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700728 def passpoint_connect_config_store_with_config_passpoint_ttls_none(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530729 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
730 "Passpoint is not supported on %s" % self.dut.model)
731 config = dict(self.config_passpoint_ttls)
732 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
733 self.eap_connect_toggle_wifi(config, self.dut)
734
735 @test_tracker_info(uuid="786e424c-b5a6-4fe9-a951-b3de16ebb6db")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700736 def passpoint_connect_config_store_with_config_passpoint_ttls_pap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530737 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
738 "Passpoint is not supported on %s" % self.dut.model)
739 config = dict(self.config_passpoint_ttls)
740 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
741 self.eap_connect_toggle_wifi(config, self.dut)
742
743 @test_tracker_info(uuid="22fd61bf-722a-4016-a778-fc33e94ed211")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700744 def passpoint_connect_config_store_with_config_passpoint_ttls_mschap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530745 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
746 "Passpoint is not supported on %s" % self.dut.model)
747 config = dict(self.config_passpoint_ttls)
748 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
749 self.eap_connect_toggle_wifi(config, self.dut)
750
751 @test_tracker_info(uuid="2abd348c-9c66-456b-88ad-55f971717620")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700752 def passpoint_connect_config_store_with_config_passpoint_ttls_mschapv2(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530753 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
754 "Passpoint is not supported on %s" % self.dut.model)
755 config = dict(self.config_passpoint_ttls)
756 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
757 self.eap_connect_toggle_wifi(config, self.dut)
758
759 @test_tracker_info(uuid="043e8cdd-db95-4f03-b308-3c8cecf874b1")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700760 def passpoint_connect_config_store_with_config_passpoint_ttls_gtc(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530761 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
762 "Passpoint is not supported on %s" % self.dut.model)
763 config = dict(self.config_passpoint_ttls)
764 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
765 self.eap_connect_toggle_wifi(config, self.dut)