diff options
author | Klement Sekera <ksekera@cisco.com> | 2020-06-22 13:15:41 +0000 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2020-06-23 07:13:05 +0000 |
commit | cc7209469601a29d0284c50716d876f685868c4b (patch) | |
tree | d74080e7534a6b160a11df55b88dcffd91052b9b | |
parent | 86d6df69e0b2ba36c56b3eae43d7847b823f91d1 (diff) |
nat: fix broken test
Type: fix
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I04952865b7e2b447763d0b67d120c3d933177646
-rw-r--r-- | src/plugins/nat/test/test_nat.py | 16 |
1 files changed, 14 insertions, 2 deletions
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): |