5 from framework import VppTestCase, VppTestRunner
6 from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
10 class TestMpcap(VppTestCase):
11 """Mpcap Unit Test Cases"""
15 super(TestMpcap, cls).setUpClass()
18 def tearDownClass(cls):
19 super(TestMpcap, cls).tearDownClass()
22 super(TestMpcap, self).setUp()
25 super(TestMpcap, self).tearDown()
27 def test_mpcap_unittest(self):
28 """Mapped pcap file test"""
30 "packet-generator new {\n"
35 " node mpcap-unittest\n"
37 " IP6: 00:d0:2d:5e:86:85 -> 00:0d:ea:d0:00:00\n"
38 " ICMP: db00::1 -> db00::2\n"
41 "trace add pg-input 15",
48 self.logger.info(self.vapi.cli(cmd))
50 size = os.path.getsize("/tmp/mpcap_unittest.pcap")
51 os.remove("/tmp/mpcap_unittest.pcap")
53 self.logger.critical("BUG: file size %d not 2184" % size)
54 self.assertNotIn("WrongMPCAPFileSize", "WrongMPCAPFileSize")
57 if __name__ == "__main__":
58 unittest.main(testRunner=VppTestRunner)