diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_dhcp.py | 7 | ||||
-rw-r--r-- | test/test_gre.py | 4 | ||||
-rw-r--r-- | test/test_ip4_vrf_multi_instance.py | 1 | ||||
-rw-r--r-- | test/test_ip6_vrf_multi_instance.py | 1 | ||||
-rw-r--r-- | test/test_mpls.py | 9 | ||||
-rw-r--r-- | test/test_neighbor.py | 7 |
6 files changed, 25 insertions, 4 deletions
diff --git a/test/test_dhcp.py b/test/test_dhcp.py index 6299975b869..a09c9bdb0b4 100644 --- a/test/test_dhcp.py +++ b/test/test_dhcp.py @@ -58,6 +58,13 @@ class TestDHCP(VppTestCase): i.set_table_ip6(table_id) table_id += 1 + def tearDown(self): + super(TestDHCP, self).tearDown() + for i in self.pg_interfaces: + i.unconfig_ip4() + i.unconfig_ip6() + i.admin_down() + def send_and_assert_no_replies(self, intf, pkts, remark): intf.add_stream(pkts) self.pg_enable_capture(self.pg_interfaces) diff --git a/test/test_gre.py b/test/test_gre.py index 89f39e4eb11..f2a5e0b0222 100644 --- a/test/test_gre.py +++ b/test/test_gre.py @@ -39,6 +39,10 @@ class TestGRE(VppTestCase): def tearDown(self): super(TestGRE, self).tearDown() + for i in self.pg_interfaces: + i.unconfig_ip4() + i.unconfig_ip6() + i.admin_down() def create_stream_ip4(self, src_if, src_ip, dst_ip): pkts = [] diff --git a/test/test_ip4_vrf_multi_instance.py b/test/test_ip4_vrf_multi_instance.py index ddf8f5939d1..b73ac9483c3 100644 --- a/test/test_ip4_vrf_multi_instance.py +++ b/test/test_ip4_vrf_multi_instance.py @@ -208,6 +208,7 @@ class TestIp4VrfMultiInst(VppTestCase): self.vrf_deleted_list.append(vrf_id) for j in range(self.pg_ifs_per_vrf): pg_if = self.pg_if_by_vrf_id[vrf_id][j] + pg_if.unconfig_ip4() if pg_if in self.pg_in_vrf: self.pg_in_vrf.remove(pg_if) if pg_if not in self.pg_not_in_vrf: diff --git a/test/test_ip6_vrf_multi_instance.py b/test/test_ip6_vrf_multi_instance.py index 7bd4d89c3e7..af80b5ba065 100644 --- a/test/test_ip6_vrf_multi_instance.py +++ b/test/test_ip6_vrf_multi_instance.py @@ -224,6 +224,7 @@ class TestIP6VrfMultiInst(VppTestCase): self.vrf_reset_list.append(vrf_id) for j in range(self.pg_ifs_per_vrf): pg_if = self.pg_if_by_vrf_id[vrf_id][j] + pg_if.unconfig_ip6() if pg_if in self.pg_in_vrf: self.pg_in_vrf.remove(pg_if) if pg_if not in self.pg_not_in_vrf: diff --git a/test/test_mpls.py b/test/test_mpls.py index 41d9426b508..9082637b0db 100644 --- a/test/test_mpls.py +++ b/test/test_mpls.py @@ -17,10 +17,6 @@ from scapy.contrib.mpls import MPLS class TestMPLS(VppTestCase): """ MPLS Test Case """ - @classmethod - def setUpClass(cls): - super(TestMPLS, cls).setUpClass() - def setUp(self): super(TestMPLS, self).setUp() @@ -44,6 +40,11 @@ class TestMPLS(VppTestCase): def tearDown(self): super(TestMPLS, self).tearDown() + for i in self.pg_interfaces: + i.unconfig_ip4() + i.unconfig_ip6() + i.ip6_disable() + i.admin_down() # the default of 64 matches the IP packet TTL default def create_stream_labelled_ip4( diff --git a/test/test_neighbor.py b/test/test_neighbor.py index 6a60809160b..885bf5a4f4b 100644 --- a/test/test_neighbor.py +++ b/test/test_neighbor.py @@ -40,6 +40,13 @@ class ARPTestCase(VppTestCase): self.pg3.set_table_ip4(1) self.pg3.config_ip4() + def tearDown(self): + super(ARPTestCase, self).tearDown() + for i in self.pg_interfaces: + i.unconfig_ip4() + i.unconfig_ip6() + i.admin_down() + def verify_arp_req(self, rx, smac, sip, dip): ether = rx[Ether] self.assertEqual(ether.dst, "ff:ff:ff:ff:ff:ff") |