3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

auto-t: add SAE test for no supported groups

This commit is contained in:
James Prestwood 2021-09-09 15:08:47 -07:00 committed by Denis Kenzior
parent a0a05a88b9
commit 4c6f0ff75a

View File

@ -8,11 +8,12 @@ import iwd
from iwd import IWD from iwd import IWD
from iwd import PSKAgent from iwd import PSKAgent
from iwd import NetworkType from iwd import NetworkType
from hostapd import HostapdCLI
class Test(unittest.TestCase): class Test(unittest.TestCase):
def validate_connection(self, wd): def validate_connection(self, wd, passphrase):
psk_agent = PSKAgent("InvalidSecret") psk_agent = PSKAgent(passphrase)
wd.register_psk_agent(psk_agent) wd.register_psk_agent(psk_agent)
devices = wd.list_devices(1) devices = wd.list_devices(1)
@ -33,7 +34,15 @@ class Test(unittest.TestCase):
def test_connection_success(self): def test_connection_success(self):
wd = IWD(True) wd = IWD(True)
self.validate_connection(wd) self.validate_connection(wd, 'InvalidSecret')
def test_no_supported_groups(self):
hostapd = HostapdCLI(config='ssidSAE.conf')
hostapd.set_value('sae_groups', '1')
hostapd.reload()
wd = IWD(True)
self.validate_connection(wd, 'secret123')
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):