diff options
author | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-01-19 18:20:07 +0200 |
---|---|---|
committer | Yaroslav Brustinov <ybrustin@cisco.com> | 2016-01-19 18:20:07 +0200 |
commit | d7ea8e1eaa6964854b6845dba334b056a8187de0 (patch) | |
tree | 1dacff1092034c6af50b70ccd6dc1feabab3597e /scripts/automation/regression/unit_tests/trex_nat_test.py | |
parent | 62623efc5b700d58335fa994d2e2725863527575 (diff) |
regression:
add rx_check negative test
add test_nat_simple_mode1 and test_nat_simple_mode2 benchmarks
remove pcaps to ensure they are created
Diffstat (limited to 'scripts/automation/regression/unit_tests/trex_nat_test.py')
-rwxr-xr-x | scripts/automation/regression/unit_tests/trex_nat_test.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/automation/regression/unit_tests/trex_nat_test.py b/scripts/automation/regression/unit_tests/trex_nat_test.py index c70c03a1..e50831e4 100755 --- a/scripts/automation/regression/unit_tests/trex_nat_test.py +++ b/scripts/automation/regression/unit_tests/trex_nat_test.py @@ -101,17 +101,17 @@ class CTRexNat_Test(CTRexGeneral_Test):#(unittest.TestCase): self.router.configure_basic_interfaces() - stat_route_dict = self.get_benchmark_param('stat_route_dict', test_name="test_nat_simple") + stat_route_dict = self.get_benchmark_param('stat_route_dict') stat_route_obj = CStaticRouteConfig(stat_route_dict) self.router.config_static_routing(stat_route_obj, mode = "config") - nat_dict = self.get_benchmark_param('nat_dict', test_name="test_nat_simple") + nat_dict = self.get_benchmark_param('nat_dict') nat_obj = CNatConfig(nat_dict) self.router.config_nat(nat_obj) # self.trex.set_yaml_file('cap2/http_simple.yaml') - mult = self.get_benchmark_param('multiplier', test_name="test_nat_simple") - core = self.get_benchmark_param('cores', test_name="test_nat_simple") + mult = self.get_benchmark_param('multiplier') + core = self.get_benchmark_param('cores') # trex_res = self.trex.run(nc=False,multiplier = mult, cores = core, duration = 100, l = 1000, learn = True) ret = self.trex.start_trex( @@ -130,7 +130,7 @@ class CTRexNat_Test(CTRexGeneral_Test):#(unittest.TestCase): print trex_res.get_latest_dump() trex_nat_stats = trex_res.get_last_value("trex-global.data", ".*nat.*") # extract all nat data - if self.get_benchmark_param('allow_timeout_dev', test_name="test_nat_simple"): + if self.get_benchmark_param('allow_timeout_dev'): nat_timeout_ratio = trex_nat_stats['m_total_nat_time_out']/trex_nat_stats['m_total_nat_open'] if nat_timeout_ratio > 0.005: self.fail('TRex nat_timeout ratio %f > 0.5%%' % nat_timeout_ratio) |