aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Bailey <anarkiwi@users.noreply.github.com>2019-07-11 19:42:03 +1200
committerGitHub <noreply@github.com>2019-07-11 19:42:03 +1200
commitaaa22fc2fe1ef1f6a75bc7ec1ea4b5915694639c (patch)
tree97896cc3f8213c904811b97543fa64a4dd127ee3
parentd4ff92d8eadf1f5fa54ec85165a331a762efb3c4 (diff)
parentf512f5523bf0d6f36011061f0bfecb036f4e9388 (diff)
downloadfaucet-aaa22fc2fe1ef1f6a75bc7ec1ea4b5915694639c.tar.gz
faucet-aaa22fc2fe1ef1f6a75bc7ec1ea4b5915694639c.tar.bz2
faucet-aaa22fc2fe1ef1f6a75bc7ec1ea4b5915694639c.zip
Merge pull request #3096 from MichaelWasher/issue_3087_alternate
Remove Dot1x Event Checks from 8021x Teardown
-rw-r--r--tests/integration/mininet_tests.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/integration/mininet_tests.py b/tests/integration/mininet_tests.py
index 74749341..520d2a5e 100644
--- a/tests/integration/mininet_tests.py
+++ b/tests/integration/mininet_tests.py
@@ -318,11 +318,12 @@ filter_id_user_deny Cleartext-Password := "deny_pass"
self.eapol1_host.cmd('kill -sigint %d' % self.eapol1_tcpdump_pid)
self._get_controller().cmd('kill %d' % self.nc_pid)
+ super(Faucet8021XBaseTest, self).tearDown()
+
+ def post_test_checks(self):
self.assertGreater(os.path.getsize(self.event_log), 0)
self.verify_dot1x_events_log()
- super(Faucet8021XBaseTest, self).tearDown()
-
def verify_dot1x_events_log(self):
def replace_mac(host_no):
@@ -621,6 +622,8 @@ class Faucet8021XSuccessTest(Faucet8021XBaseTest):
1,
self.scrape_prometheus_var('dp_dot1x_logoff_total', default=0))
+ self.post_test_checks()
+
class Faucet8021XFailureTest(Faucet8021XBaseTest):
"""Failure due to incorrect identity/password"""
@@ -666,6 +669,7 @@ class Faucet8021XFailureTest(Faucet8021XBaseTest):
self.assertEqual(
1,
self.scrape_prometheus_var('port_dot1x_failure_total', labels=port_labels, default=0))
+ self.post_test_checks()
class Faucet8021XPortStatusTest(Faucet8021XBaseTest):
@@ -727,6 +731,7 @@ class Faucet8021XPortStatusTest(Faucet8021XBaseTest):
self.one_ipv4_ping(
self.eapol1_host, self.ping_host.IP(),
require_host_learned=False, expected_result=False)
+ self.post_test_checks()
class Faucet8021XPortFlapTest(Faucet8021XBaseTest):
@@ -760,6 +765,8 @@ class Faucet8021XPortFlapTest(Faucet8021XBaseTest):
# Kill supplicant so cant reply to the port up identity request.
self.terminate_wpasupplicant(self.eapol1_host)
+ self.post_test_checks()
+
class Faucet8021XIdentityOnPortUpTest(Faucet8021XBaseTest):
@@ -809,6 +816,8 @@ class Faucet8021XIdentityOnPortUpTest(Faucet8021XBaseTest):
2,
self.scrape_prometheus_var('port_dot1x_success_total', labels=port_labels1, default=0))
+ self.post_test_checks()
+
class Faucet8021XPeriodicReauthTest(Faucet8021XBaseTest):
@@ -833,6 +842,7 @@ class Faucet8021XPeriodicReauthTest(Faucet8021XBaseTest):
break
time.sleep(1)
self.assertEquals(expected_total, total, msg='failed to successfully re-auth')
+ self.post_test_checks()
class Faucet8021XConfigReloadTest(Faucet8021XBaseTest):
@@ -852,6 +862,7 @@ class Faucet8021XConfigReloadTest(Faucet8021XBaseTest):
restart=True, cold_start=False, change_expected=True)
self.wait_8021x_flows(port_no2)
+ self.post_test_checks()
class Faucet8021XCustomACLLoginTest(Faucet8021XBaseTest):
@@ -933,6 +944,7 @@ acls:
self.one_ipv4_ping(self.eapol1_host, self.ping_host.IP(),
require_host_learned=False, expected_result=True)
+ self.post_test_checks()
class Faucet8021XCustomACLLogoutTest(Faucet8021XCustomACLLoginTest):
@@ -952,6 +964,7 @@ class Faucet8021XCustomACLLogoutTest(Faucet8021XCustomACLLoginTest):
self.one_ipv4_ping(self.eapol1_host, self.ping_host.IP(),
require_host_learned=False, expected_result=False)
+ self.post_test_checks()
class Faucet8021XMABTest(Faucet8021XSuccessTest):
@@ -1019,6 +1032,7 @@ class Faucet8021XMABTest(Faucet8021XSuccessTest):
self.assertEqual(
1,
self.scrape_prometheus_var('port_dot1x_success_total', labels=port_labels1, default=0))
+ self.post_test_checks()
class Faucet8021XDynACLLoginTest(Faucet8021XCustomACLLoginTest):
@@ -1150,6 +1164,7 @@ acls:
self.one_ipv4_ping(self.eapol2_host, self.ping_host.IP(),
require_host_learned=False, expected_result=False)
+ self.post_test_checks()
class Faucet8021XDynACLLogoutTest(Faucet8021XDynACLLoginTest):
@@ -1184,6 +1199,7 @@ class Faucet8021XDynACLLogoutTest(Faucet8021XDynACLLoginTest):
self.one_ipv4_ping(self.eapol1_host, self.ping_host.IP(),
require_host_learned=False, expected_result=False)
+ self.post_test_checks()
class Faucet8021XVLANTest(Faucet8021XSuccessTest):
@@ -1445,6 +1461,8 @@ class Faucet8021XVLANTest(Faucet8021XSuccessTest):
table_id=self._FLOOD_TABLE,
actions=['POP_VLAN', 'OUTPUT:%s' % port_no2])
+ self.post_test_checks()
+
class FaucetUntaggedRandomVidTest(FaucetUntaggedTest):