From d7ea8e1eaa6964854b6845dba334b056a8187de0 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Tue, 19 Jan 2016 18:20:07 +0200 Subject: regression: add rx_check negative test add test_nat_simple_mode1 and test_nat_simple_mode2 benchmarks remove pcaps to ensure they are created --- .../unit_tests/functional_tests/pkt_builder_test.py | 8 ++++---- .../regression/unit_tests/functional_tests/test.pcap | Bin 346 -> 0 bytes .../regression/unit_tests/functional_tests/test2.pcap | Bin 93 -> 0 bytes .../regression/unit_tests/functional_tests/test_cmp.pcap | Bin 346 -> 0 bytes 4 files changed, 4 insertions(+), 4 deletions(-) delete mode 100755 scripts/automation/regression/unit_tests/functional_tests/test.pcap delete mode 100755 scripts/automation/regression/unit_tests/functional_tests/test2.pcap delete mode 100755 scripts/automation/regression/unit_tests/functional_tests/test_cmp.pcap (limited to 'scripts/automation/regression/unit_tests/functional_tests') diff --git a/scripts/automation/regression/unit_tests/functional_tests/pkt_builder_test.py b/scripts/automation/regression/unit_tests/functional_tests/pkt_builder_test.py index fd157c8a..6d18b7ef 100755 --- a/scripts/automation/regression/unit_tests/functional_tests/pkt_builder_test.py +++ b/scripts/automation/regression/unit_tests/functional_tests/pkt_builder_test.py @@ -188,7 +188,7 @@ class CTRexPktBuilder_Test(pkt_bld_general_test.CGeneralPktBld_Test): def test_get_layer(self): assert_equal(self.pkt_bld.get_layer('no_such_layer'), None) assert(not(self.pkt_bld.get_layer('l2') is self.pkt_bld._packet)) - assert(type(self.pkt_bld.get_layer('l2')).__name__, "ethernet") + assert_equal(type(self.pkt_bld.get_layer('l2')).__name__, "ethernet") def test_dump_to_pcap(self): # set Ethernet layer attributes @@ -212,11 +212,11 @@ class CTRexPktBuilder_Test(pkt_bld_general_test.CGeneralPktBld_Test): # finally, set IP header len with relation to payload data self.pkt_bld.set_layer_attr("l3_ip", "len", len(self.pkt_bld.get_layer('l3_ip'))) - filepath = "unit_tests/functional_tests/test.pcap" + filepath = "reports/test.pcap" self.pkt_bld.dump_pkt_to_pcap(filepath) assert os.path.isfile(filepath) - # remove pcap after creation - masked for now - # os.remove(filepath) + # remove pcap after ensuring it exists + os.remove(filepath) filepath = "/not/a/valid/path/test.pcap" assert_raises(IOError, self.pkt_bld.dump_pkt_to_pcap, filepath) # check that dump is not available for empty packet diff --git a/scripts/automation/regression/unit_tests/functional_tests/test.pcap b/scripts/automation/regression/unit_tests/functional_tests/test.pcap deleted file mode 100755 index e2b12565..00000000 Binary files a/scripts/automation/regression/unit_tests/functional_tests/test.pcap and /dev/null differ diff --git a/scripts/automation/regression/unit_tests/functional_tests/test2.pcap b/scripts/automation/regression/unit_tests/functional_tests/test2.pcap deleted file mode 100755 index 1d35d9c1..00000000 Binary files a/scripts/automation/regression/unit_tests/functional_tests/test2.pcap and /dev/null differ diff --git a/scripts/automation/regression/unit_tests/functional_tests/test_cmp.pcap b/scripts/automation/regression/unit_tests/functional_tests/test_cmp.pcap deleted file mode 100755 index 4c92859f..00000000 Binary files a/scripts/automation/regression/unit_tests/functional_tests/test_cmp.pcap and /dev/null differ -- cgit