3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-19 10:02:33 +01:00

auto-t: stop AuthCenter on failures

This commit is contained in:
Tim Kourt 2018-01-03 16:08:45 -08:00 committed by Denis Kenzior
parent b8f426acfc
commit b1745aca79
6 changed files with 31 additions and 11 deletions

View File

@ -6,7 +6,6 @@ import sys
sys.path.append('../util') sys.path.append('../util')
import iwd import iwd
from iwd import IWD from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType from iwd import NetworkType
from hlrauc import AuthCenter from hlrauc import AuthCenter
from ofono import Ofono from ofono import Ofono
@ -43,7 +42,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected' condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)
try:
ordered_network.network_object.connect() ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected' condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)

View File

@ -43,7 +43,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected' condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)
try:
ordered_network.network_object.connect() ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected' condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)
@ -54,6 +58,7 @@ class Test(unittest.TestCase):
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)
auth.stop() auth.stop()
@classmethod @classmethod
def setUpClass(cls): def setUpClass(cls):
IWD.copy_to_storage('ssidEAP-AKA.8021x') IWD.copy_to_storage('ssidEAP-AKA.8021x')

View File

@ -6,7 +6,6 @@ import sys
sys.path.append('../util') sys.path.append('../util')
import iwd import iwd
from iwd import IWD from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType from iwd import NetworkType
from hlrauc import AuthCenter from hlrauc import AuthCenter
@ -38,7 +37,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected' condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)
try:
ordered_network.network_object.connect() ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected' condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)

View File

@ -6,7 +6,6 @@ import sys
sys.path.append('../util') sys.path.append('../util')
import iwd import iwd
from iwd import IWD from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType from iwd import NetworkType
from hlrauc import AuthCenter from hlrauc import AuthCenter
@ -38,7 +37,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected' condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)
try:
ordered_network.network_object.connect() ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected' condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)

View File

@ -6,7 +6,6 @@ import sys
sys.path.append('../util') sys.path.append('../util')
import iwd import iwd
from iwd import IWD from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType from iwd import NetworkType
from hlrauc import AuthCenter from hlrauc import AuthCenter
from ofono import Ofono from ofono import Ofono
@ -43,7 +42,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected' condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)
try:
ordered_network.network_object.connect() ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected' condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)

View File

@ -6,7 +6,6 @@ import sys
sys.path.append('../util') sys.path.append('../util')
import iwd import iwd
from iwd import IWD from iwd import IWD
from iwd import PSKAgent
from iwd import NetworkType from iwd import NetworkType
from hlrauc import AuthCenter from hlrauc import AuthCenter
@ -38,7 +37,11 @@ class Test(unittest.TestCase):
condition = 'not obj.connected' condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)
try:
ordered_network.network_object.connect() ordered_network.network_object.connect()
except:
auth.stop()
raise
condition = 'obj.connected' condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition) wd.wait_for_object_condition(ordered_network.network_object, condition)