From cc7209469601a29d0284c50716d876f685868c4b Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Mon, 22 Jun 2020 13:15:41 +0000 Subject: nat: fix broken test Type: fix Signed-off-by: Klement Sekera Change-Id: I04952865b7e2b447763d0b67d120c3d933177646 --- src/plugins/nat/test/test_nat.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/plugins/nat') diff --git a/src/plugins/nat/test/test_nat.py b/src/plugins/nat/test/test_nat.py index e996373342a..640e8036611 100644 --- a/src/plugins/nat/test/test_nat.py +++ b/src/plugins/nat/test/test_nat.py @@ -1389,6 +1389,19 @@ class MethodHolder(VppTestCase): class TestNAT44(MethodHolder): """ NAT44 Test Cases """ + max_translations = 10240 + max_users = 10240 + + @classmethod + def setUpConstants(cls): + super(TestNAT44, cls).setUpConstants() + cls.vpp_cmdline.extend([ + "nat", "{", + "max translations per thread %d" % cls.max_translations, + "max users per thread %d" % cls.max_users, + "}" + ]) + @classmethod def setUpClass(cls): super(TestNAT44, cls).setUpClass() @@ -2785,8 +2798,7 @@ class TestNAT44(MethodHolder): sw_if_index=self.pg1.sw_if_index, is_add=1) - nat44_config = self.vapi.nat_show_config() - max_sessions = 10 * nat44_config.translation_buckets + max_sessions = self.max_translations pkts = [] for i in range(0, max_sessions): -- cgit 1.2.3-korg