mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +01:00
auto-t: add a DGAF Disable hotspot test
This commit is contained in:
parent
ba5f4616d2
commit
09f4bd9210
@ -14,11 +14,7 @@ import testutil
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def test_connection_success(self):
|
||||
wd = self.wd
|
||||
|
||||
hapd = HostapdCLI(config='ssidHotspot.conf')
|
||||
|
||||
def validate_connection(self, wd, hapd, dgaf_disable=False):
|
||||
psk_agent = PSKAgent('abc', ('domain\\user', 'testpasswd'))
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
@ -38,7 +34,16 @@ class Test(unittest.TestCase):
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
testutil.test_iface_operstate()
|
||||
testutil.test_ifaces_connected(device.name, hapd.ifname)
|
||||
|
||||
if not dgaf_disable:
|
||||
testutil.test_ifaces_connected(device.name, hapd.ifname)
|
||||
else:
|
||||
# This is expected to fail with group traffic
|
||||
with self.assertRaises(Exception):
|
||||
testutil.test_ifaces_connected(device.name, hapd.ifname, expect_fail=True)
|
||||
|
||||
# Now try again without testing group traffic
|
||||
testutil.test_ifaces_connected(device.name, hapd.ifname, group=False)
|
||||
|
||||
device.disconnect()
|
||||
|
||||
@ -47,6 +52,20 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd.unregister_psk_agent(psk_agent)
|
||||
|
||||
def test_hotspot(self):
|
||||
hapd = HostapdCLI(config='ssidHotspot.conf')
|
||||
hapd.set_value('disable_dgaf', '0')
|
||||
hapd.reload()
|
||||
|
||||
self.validate_connection(self.wd, hapd)
|
||||
|
||||
def test_dgaf_disabled(self):
|
||||
hapd = HostapdCLI(config='ssidHotspot.conf')
|
||||
hapd.set_value('disable_dgaf', '1')
|
||||
hapd.reload()
|
||||
|
||||
self.validate_connection(self.wd, hapd, dgaf_disable=True)
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
IWD.copy_to_hotspot('example.conf')
|
||||
|
Loading…
Reference in New Issue
Block a user