blob: d3e69e924b58731e3357b4d38563353d30ad65cb [file] [log] [blame]
Ole Troan72d87582019-05-10 12:01:10 +02001#!/usr/bin/env python
2"""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)