summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Vinciguerra <pvinci@vinciconsulting.com>2018-12-16 14:52:36 -0800
committerOle Trøan <otroan@employees.org>2018-12-17 10:14:12 +0000
commit4eed7474f4fba7193ba342fb29c6ec1d73aef909 (patch)
tree7c6553af00866c212fc38dcb960e0eb38e23aaf5
parent8f554b793c68fd5271334bf0e167dabc4c9ac73d (diff)
Fix TestIPv4FibCrud interdependencies.
The tests fail if run independently or out of order. This change breaks the dependency between the tests. ERROR: Add 1k routes ------------------------------------------------------------------------------ Traceback (most recent call last): File "/vpp/test/test_ip4.py", line 514, in test_3_add_new_routes self.deleted_routes.remove(x) ValueError: list.remove(x): x not in list Change-Id: I344ceba6bd8b86556f92e50080be6c43092b9faf Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
-rw-r--r--test/test_ip4.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_ip4.py b/test/test_ip4.py
index 685d0894aec..e28a896b815 100644
--- a/test/test_ip4.py
+++ b/test/test_ip4.py
@@ -441,6 +441,9 @@ class TestIPv4FibCrud(VppTestCase):
super(TestIPv4FibCrud, self).setUp()
self.reset_packet_infos()
+ self.configured_routes = []
+ self.deleted_routes = []
+
def test_1_add_routes(self):
""" Add 1k routes
@@ -471,6 +474,9 @@ class TestIPv4FibCrud(VppTestCase):
- delete 10 routes check with traffic script.
"""
+ # config 1M FIB entries
+ self.configured_routes.extend(self.config_fib_many_to_one(
+ "10.0.0.0", self.pg0.remote_ip4, 100))
self.deleted_routes.extend(self.unconfig_fib_many_to_one(
"10.0.0.10", self.pg0.remote_ip4, 10))
for x in self.deleted_routes:
@@ -501,6 +507,14 @@ class TestIPv4FibCrud(VppTestCase):
- re-add 5 routes check with traffic script.
- add 100 routes check with traffic script.
"""
+ # config 1M FIB entries
+ self.configured_routes.extend(self.config_fib_many_to_one(
+ "10.0.0.0", self.pg0.remote_ip4, 100))
+ self.deleted_routes.extend(self.unconfig_fib_many_to_one(
+ "10.0.0.10", self.pg0.remote_ip4, 10))
+ for x in self.deleted_routes:
+ self.configured_routes.remove(x)
+
tmp = self.config_fib_many_to_one(
"10.0.0.10", self.pg0.remote_ip4, 5)
self.configured_routes.extend(tmp)