X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Ftest_lisp.py;h=596df8caac4239273a04ed6799ba3219a568a6d0;hb=d3884202a7a7e9896baf58ce7e7dd697965840ff;hp=03a5c2a526d1fc4fd1226dcf5059ba46eb96c53c;hpb=ea2450fa2d1e8ba0295ea9861a404796100dad1e;p=vpp.git diff --git a/test/test_lisp.py b/test/test_lisp.py index 03a5c2a526d..596df8caac4 100644 --- a/test/test_lisp.py +++ b/test/test_lisp.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import abc import six @@ -145,6 +145,10 @@ class TestLisp(VppTestCase): i.config_ip4() # configure IPv4 address on the interface i.resolve_arp() # resolve ARP, so that we know VPP MAC + @classmethod + def tearDownClass(cls): + super(TestLisp, cls).tearDownClass() + def setUp(self): super(TestLisp, self).setUp() self.vapi.lisp_enable_disable(is_enabled=1) @@ -160,12 +164,12 @@ class TestLisp(VppTestCase): test_cases = [ { 'name': 'basic ip4 over ip4', - 'locator-sets': [VppLispLocatorSet(self, 'ls-4o4')], + 'locator-sets': [VppLispLocatorSet(self, b'ls-4o4')], 'locators': [ - VppLispLocator(self, self.pg1.sw_if_index, 'ls-4o4') + VppLispLocator(self, self.pg1.sw_if_index, b'ls-4o4') ], 'local-mappings': [ - VppLocalMapping(self, self.seid_ip4, 'ls-4o4') + VppLocalMapping(self, self.seid_ip4, b'ls-4o4') ], 'remote-mappings': [ VppRemoteMapping(self, self.deid_ip4_net, @@ -185,5 +189,25 @@ class TestLisp(VppTestCase): self.test_driver.run(self.deid_ip4) +class TestLispUT(VppTestCase): + """ Lisp UT """ + + @classmethod + def setUpClass(cls): + super(TestLispUT, cls).setUpClass() + + @classmethod + def tearDownClass(cls): + super(TestLispUT, cls).tearDownClass() + + def test_fib(self): + """ LISP Unit Tests """ + error = self.vapi.cli("test lisp cp") + + if error: + self.logger.critical(error) + self.assertNotIn("Failed", error) + + if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)