X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_session.py;h=60e5eb4f8a3886db8173717baaf631a07d85fce5;hb=67a7749cac97e7a5fe24984d1770889a3203db95;hp=afea5f6a90ddf3936fc19444e6c3a519a4a56e3f;hpb=9a6dafd569db0d0b5dc9d7b5b34b17e3f411a9ee;p=vpp.git diff --git a/test/test_session.py b/test/test_session.py index afea5f6a90d..60e5eb4f8a3 100644 --- a/test/test_session.py +++ b/test/test_session.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import unittest @@ -13,6 +13,10 @@ class TestSession(VppTestCase): def setUpClass(cls): super(TestSession, cls).setUpClass() + @classmethod + def tearDownClass(cls): + super(TestSession, cls).tearDownClass() + def setUp(self): super(TestSession, self).setUp() @@ -33,9 +37,9 @@ class TestSession(VppTestCase): table_id += 1 # Configure namespaces - self.vapi.app_namespace_add_del(namespace_id="0", + self.vapi.app_namespace_add_del(namespace_id=b"0", sw_if_index=self.loop0.sw_if_index) - self.vapi.app_namespace_add_del(namespace_id="1", + self.vapi.app_namespace_add_del(namespace_id=b"1", sw_if_index=self.loop1.sw_if_index) def tearDown(self): @@ -88,6 +92,14 @@ class TestSession(VppTestCase): class TestSessionUnitTests(VppTestCase): """ Session Unit Tests Case """ + @classmethod + def setUpClass(cls): + super(TestSessionUnitTests, cls).setUpClass() + + @classmethod + def tearDownClass(cls): + super(TestSessionUnitTests, cls).tearDownClass() + def setUp(self): super(TestSessionUnitTests, self).setUp() self.vapi.session_enable_disable(is_enabled=1) @@ -104,5 +116,31 @@ class TestSessionUnitTests(VppTestCase): super(TestSessionUnitTests, self).tearDown() self.vapi.session_enable_disable(is_enabled=0) + +class TestSvmFifoUnitTests(VppTestCase): + """ SVM Fifo Unit Tests Case """ + + @classmethod + def setUpClass(cls): + super(TestSvmFifoUnitTests, cls).setUpClass() + + @classmethod + def tearDownClass(cls): + super(TestSvmFifoUnitTests, cls).tearDownClass() + + def setUp(self): + super(TestSvmFifoUnitTests, self).setUp() + + def test_svm_fifo(self): + """ SVM Fifo Unit Tests """ + error = self.vapi.cli("test svm fifo all") + + if error: + self.logger.critical(error) + self.assertNotIn("failed", error) + + def tearDown(self): + super(TestSvmFifoUnitTests, self).tearDown() + if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)