Skip to content

Commit 6b838ef

Browse files
committed
[airos] added test for eap method in wpa2_enterprise for access point
1 parent e8aeaee commit 6b838ef

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

tests/airos/test_wpasupplicant.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,3 +290,55 @@ def test_wpa2_personal(self):
290290
}
291291
]
292292
self.assertEqualConfig(o.intermediate_data['wpasupplicant'], expected)
293+
294+
def test_eap_wpa2_enterprise(self):
295+
o = self.backend({
296+
"interfaces": [
297+
{
298+
"type": "wireless",
299+
"name": "wlan0",
300+
"mac": "de:9f:db:30:c9:c5",
301+
"mtu": 1500,
302+
"txqueuelen": 1000,
303+
"wireless": {
304+
"radio": "radio0",
305+
"mode": "access_point",
306+
"ssid": "ap-ssid-example",
307+
"encryption": {
308+
"protocol": "wpa2_enterprise",
309+
"server": "radius.example.com",
310+
"key": "the-shared-key",
311+
"acct_server": "accounting.example.com",
312+
},
313+
},
314+
}
315+
]
316+
})
317+
o.to_intermediate()
318+
expected = [
319+
{
320+
'device.1.devname': 'radio0',
321+
'device.1.driver': 'madwifi',
322+
'device.1.profile': 'AUTO',
323+
'device.1.status': 'enabled',
324+
'profile.1.name': 'AUTO',
325+
'profile.1.network.1.anonymous_identity': 'TODO',
326+
'profile.1.network.1.eap.1.name': 'TTLS',
327+
'profile.1.network.1.eap.1.status': 'enabled',
328+
'profile.1.network.1.identity': 'TODO',
329+
'profile.1.network.1.key_mgmt.1.name': 'WPA-EAP',
330+
'profile.1.network.1.pairwise.1.name': 'CCMP',
331+
'profile.1.network.1.password': 'TODO',
332+
'profile.1.network.1.phase2=auth': 'MSCHAPV2',
333+
'profile.1.network.1.priority': 100,
334+
'profile.1.network.1.proto.1.name': 'RSN',
335+
'profile.1.network.1.ssid': 'ap-ssid-example',
336+
'profile.1.network.2.key_mgmt.1.name': 'NONE',
337+
'profile.1.network.2.priority': 2,
338+
'profile.1.network.2.status': 'disabled',
339+
},
340+
{
341+
'status': 'enabled',
342+
},
343+
]
344+
self.assertEqualConfig(o.intermediate_data['wpasupplicant'], expected)

0 commit comments

Comments
 (0)