X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_flowprobe.py;h=c7b1f722fe0fa64393b2631655e14a548b13554d;hb=ea2450fa2d1e8ba0295ea9861a404796100dad1e;hp=bb5062755f93740e209ba3980d88debb2f108d4d;hpb=defde0f87067eb473660794cbd4a2da69fdd191d;p=vpp.git diff --git a/test/test_flowprobe.py b/test/test_flowprobe.py index bb5062755f9..c7b1f722fe0 100644 --- a/test/test_flowprobe.py +++ b/test/test_flowprobe.py @@ -158,6 +158,10 @@ class MethodHolder(VppTestCase): super(MethodHolder, cls).tearDownClass() raise + @classmethod + def tearDownClass(cls): + super(MethodHolder, cls).tearDownClass() + def create_stream(self, src_if=None, dst_if=None, packets=None, size=None, ip_ver='v4'): """Create a packet stream to tickle the plugin @@ -325,6 +329,14 @@ class MethodHolder(VppTestCase): class Flowprobe(MethodHolder): """Template verification, timer tests""" + @classmethod + def setUpClass(cls): + super(Flowprobe, cls).setUpClass() + + @classmethod + def tearDownClass(cls): + super(Flowprobe, cls).tearDownClass() + def test_0001(self): """ timer less than template timeout""" self.logger.info("FFP_TEST_START_0001") @@ -461,6 +473,14 @@ class Flowprobe(MethodHolder): class Datapath(MethodHolder): """collect information on Ethernet, IP4 and IP6 datapath (no timers)""" + @classmethod + def setUpClass(cls): + super(Datapath, cls).setUpClass() + + @classmethod + def tearDownClass(cls): + super(Datapath, cls).tearDownClass() + def test_templatesL2(self): """ verify template on L2 datapath""" self.logger.info("FFP_TEST_START_0000") @@ -828,6 +848,14 @@ class Datapath(MethodHolder): class DisableIPFIX(MethodHolder): """Disable IPFIX""" + @classmethod + def setUpClass(cls): + super(DisableIPFIX, cls).setUpClass() + + @classmethod + def tearDownClass(cls): + super(DisableIPFIX, cls).tearDownClass() + def test_0001(self): """ disable IPFIX after first packets""" self.logger.info("FFP_TEST_START_0001") @@ -869,6 +897,14 @@ class DisableIPFIX(MethodHolder): class ReenableIPFIX(MethodHolder): """Re-enable IPFIX""" + @classmethod + def setUpClass(cls): + super(ReenableIPFIX, cls).setUpClass() + + @classmethod + def tearDownClass(cls): + super(ReenableIPFIX, cls).tearDownClass() + def test_0011(self): """ disable IPFIX after first packets and re-enable after few packets """ @@ -891,7 +927,7 @@ class ReenableIPFIX(MethodHolder): self.wait_for_cflow_packet(self.collector, templates[1]) self.collector.get_capture(4) - # disble IPFIX + # disable IPFIX ipfix.disable_exporter() self.vapi.cli("ipfix flush") self.pg_enable_capture([self.collector]) @@ -930,6 +966,14 @@ class ReenableIPFIX(MethodHolder): class DisableFP(MethodHolder): """Disable Flowprobe feature""" + @classmethod + def setUpClass(cls): + super(DisableFP, cls).setUpClass() + + @classmethod + def tearDownClass(cls): + super(DisableFP, cls).tearDownClass() + def test_0001(self): """ disable flowprobe feature after first packets""" self.logger.info("FFP_TEST_START_0001") @@ -970,6 +1014,14 @@ class DisableFP(MethodHolder): class ReenableFP(MethodHolder): """Re-enable Flowprobe feature""" + @classmethod + def setUpClass(cls): + super(ReenableFP, cls).setUpClass() + + @classmethod + def tearDownClass(cls): + super(ReenableFP, cls).tearDownClass() + def test_0001(self): """ disable flowprobe feature after first packets and re-enable after few packets """