summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2019-12-16 20:56:00 -0500
committerNeale Ranns <nranns@cisco.com>2019-12-23 07:33:12 +0000
commit548d5ee7336dc114d58e24dcae9a9ba3658d8410 (patch)
treee81222031d1cadf2e551dff20049a95fb276cd0b
parent4a94cd26efbb37b01085b99e0de29d4b4cbfe234 (diff)
tests: TestL2bdMultiInst - break serial dependency on tests
enable the tests to run out of order/enable running an individual test. Before: [gw1] [ 20%] FAILED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_02 [gw0] [ 40%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_01 [gw1] [ 60%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_04 [gw0] [ 80%] FAILED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_03 [gw1] [100%] SKIPPED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_05 ------- After: [gw1] [ 20%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_02 [gw0] [ 40%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_01 [gw1] [ 60%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_04 [gw0] [ 80%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_03 [gw1] [100%] PASSED test/test_l2bd_multi_instance.py::TestL2bdMultiInst::test_l2bd_inst_05 Type: test Change-Id: Ie40eb310f5fccacf854c364aa017891bce9b9372 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
-rw-r--r--test/test_l2bd_multi_instance.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/test/test_l2bd_multi_instance.py b/test/test_l2bd_multi_instance.py
index cb00a4e0ecc..b51bb5e6c81 100644
--- a/test/test_l2bd_multi_instance.py
+++ b/test/test_l2bd_multi_instance.py
@@ -115,15 +115,6 @@ class TestL2bdMultiInst(VppTestCase):
for i in cls.pg_interfaces:
i.admin_up()
- # Create list of BDs
- cls.bd_list = list()
-
- # Create list of deleted BDs
- cls.bd_deleted_list = list()
-
- # Create list of pg_interfaces in BDs
- cls.pg_in_bd = list()
-
except Exception:
super(TestL2bdMultiInst, cls).tearDownClass()
raise
@@ -138,6 +129,14 @@ class TestL2bdMultiInst(VppTestCase):
"""
self.reset_packet_infos()
super(TestL2bdMultiInst, self).setUp()
+ # Create list of BDs
+ self.bd_list = []
+
+ # Create list of deleted BDs
+ self.bd_deleted_list = []
+
+ # Create list of pg_interfaces in BDs
+ self.pg_in_bd = []
def tearDown(self):
"""
@@ -406,12 +405,14 @@ class TestL2bdMultiInst(VppTestCase):
# Test 1
# self.vapi.cli("clear trace")
self.run_verify_test()
+ self.delete_bd(5)
def test_l2bd_inst_02(self):
""" L2BD Multi-instance test 2 - update data of 5 BDs
"""
# Config 2
# Update data of 5 BDs (disable learn, forward, flood, uu-flood)
+ self.create_bd_and_mac_learn(5)
self.set_bd_flags(self.bd_list[0], learn=False, forward=False,
flood=False, uu_flood=False)
self.set_bd_flags(self.bd_list[1], forward=False)
@@ -432,12 +433,14 @@ class TestL2bdMultiInst(VppTestCase):
flood=True, uu_flood=False)
self.verify_bd(self.bd_list[4], learn=False, forward=True,
flood=True, uu_flood=True)
+ self.delete_bd(5)
def test_l2bd_inst_03(self):
""" L2BD Multi-instance test 3 - delete 2 BDs
"""
# Config 3
# Delete 2 BDs
+ self.create_bd_and_mac_learn(5)
self.delete_bd(2)
# Verify 3
@@ -448,6 +451,7 @@ class TestL2bdMultiInst(VppTestCase):
# Test 3
self.run_verify_test()
+ self.delete_bd(3, 3)
def test_l2bd_inst_04(self):
""" L2BD Multi-instance test 4 - add 2 BDs
@@ -464,13 +468,14 @@ class TestL2bdMultiInst(VppTestCase):
# Test 4
# self.vapi.cli("clear trace")
self.run_verify_test()
+ self.delete_bd(2)
- @unittest.skipUnless(running_extended_tests, "part of extended tests")
def test_l2bd_inst_05(self):
""" L2BD Multi-instance test 5 - delete 5 BDs
"""
# Config 5
# Delete 5 BDs
+ self.create_bd_and_mac_learn(5)
self.delete_bd(5)
# Verify 5