summaryrefslogtreecommitdiffstats
path: root/scripts/automation/regression/stateful_tests/trex_nat_test.py
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-12-21 17:15:04 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-12-22 10:18:40 +0200
commitd99346269fed5539d483113a4b37928619c6640a (patch)
tree29785f11d04e444181f7161b03ea73352deb3b4d /scripts/automation/regression/stateful_tests/trex_nat_test.py
parente528048b2a9c99899cf1f69a2c11f51a383384db (diff)
UDP NAT --learn mode 1,3 support - doc + regression tests
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'scripts/automation/regression/stateful_tests/trex_nat_test.py')
-rwxr-xr-xscripts/automation/regression/stateful_tests/trex_nat_test.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/automation/regression/stateful_tests/trex_nat_test.py b/scripts/automation/regression/stateful_tests/trex_nat_test.py
index c23f67c4..3da1dc79 100755
--- a/scripts/automation/regression/stateful_tests/trex_nat_test.py
+++ b/scripts/automation/regression/stateful_tests/trex_nat_test.py
@@ -88,15 +88,21 @@ class CTRexNat_Test(CTRexGeneral_Test):#(unittest.TestCase):
def test_nat_simple_mode1(self):
- self.nat_simple_helper(learn_mode=1)
+ self.nat_simple_helper(learn_mode=1, traffic_file='cap2/http_simple.yaml')
def test_nat_simple_mode2(self):
- self.nat_simple_helper(learn_mode=2)
+ self.nat_simple_helper(learn_mode=2, traffic_file='cap2/http_simple.yaml')
def test_nat_simple_mode3(self):
- self.nat_simple_helper(learn_mode=3)
+ self.nat_simple_helper(learn_mode=3, traffic_file='cap2/http_simple.yaml')
- def nat_simple_helper(self, learn_mode=1):
+ def test_nat_simple_mode1_udp(self):
+ self.nat_simple_helper(learn_mode=1, traffic_file='cap2/dns.yaml')
+
+ def test_nat_simple_mode3_udp(self):
+ self.nat_simple_helper(learn_mode=3, traffic_file='cap2/dns.yaml')
+
+ def nat_simple_helper(self, learn_mode=1, traffic_file='cap2/http_simple.yaml'):
# test initializtion
self.router.configure_basic_interfaces()
@@ -119,7 +125,7 @@ class CTRexNat_Test(CTRexGeneral_Test):#(unittest.TestCase):
m = mult,
learn_mode = learn_mode,
d = 100,
- f = 'cap2/http_simple.yaml',
+ f = traffic_file,
l = 1000)
trex_res = self.trex.sample_to_run_finish()