blob: 97885b9b44ef131e5f2bff86c683c619494c299d [file] [log] [blame]
Renato Botelho do Coutoead1e532019-10-31 13:31:07 -05001#!/usr/bin/env python3
Ole Troan72d87582019-05-10 12:01:10 +02002"""CLI functional tests"""
3
4import unittest
5from framework import VppTestCase, VppTestRunner
6
7
8class TestCLI(VppTestCase):
9 """ CLI Test Case """
10 maxDiff = None
11
12 @classmethod
13 def setUpClass(cls):
14 super(TestCLI, cls).setUpClass()
15
16 @classmethod
17 def tearDownClass(cls):
18 super(TestCLI, cls).tearDownClass()
19
20 def setUp(self):
21 super(TestCLI, self).setUp()
22
23 def tearDown(self):
24 super(TestCLI, self).tearDown()
25
26 def test_cli_retval(self):
27 """ CLI inband retval """
28 rv = self.vapi.papi.cli_inband(cmd='this command does not exist')
29 self.assertNotEqual(rv.retval, 0)
30
31 rv = self.vapi.papi.cli_inband(cmd='show version')
32 self.assertEqual(rv.retval, 0)
33
34
35if __name__ == '__main__':
36 unittest.main(testRunner=VppTestRunner)