summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-02-13 23:20:04 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-03 17:11:26 +0000
commit4008ac998f43265451281cb6e759cd6184e50bed (patch)
tree7129722f04fac33d79f90b36ca91be2a3aa94eaa /test
parent7112c542eac53d28861062b13b602a2817dc4052 (diff)
Changing the IP table for an interface is an error if the interface already has an address configured (VPP-601)
Change-Id: I311fc264f73dd3b2b3ce9d7d1c33cd0515b36c4a Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test')
-rw-r--r--test/test_dhcp.py7
-rw-r--r--test/test_gre.py4
-rw-r--r--test/test_ip4_vrf_multi_instance.py1
-rw-r--r--test/test_ip6_vrf_multi_instance.py1
-rw-r--r--test/test_mpls.py9
-rw-r--r--test/test_neighbor.py7
6 files changed, 25 insertions, 4 deletions
diff --git a/test/test_dhcp.py b/test/test_dhcp.py
index 6299975b..a09c9bdb 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 89f39e4e..f2a5e0b0 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 ddf8f593..b73ac948 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 7bd4d89c..af80b5ba 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 41d9426b..9082637b 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 6a608091..885bf5a4 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")