vlib: increase the stats epoch only when necessary
[vpp.git] / src / vlib / test / test_counters.py
1 #!/usr/bin/env python3
2
3 from framework import VppTestCase
4
5
6 class TestCounters(VppTestCase):
7     """ Counters C Unit Tests """
8
9     @classmethod
10     def setUpClass(cls):
11         super(TestCounters, cls).setUpClass()
12
13     @classmethod
14     def tearDownClass(cls):
15         super(TestCounters, cls).tearDownClass()
16
17     def setUp(self):
18         super(TestCounters, self).setUp()
19
20     def tearDown(self):
21         super(TestCounters, self).tearDown()
22
23     def test_counter_simple_expand(self):
24         """ Simple Counter Expand """
25         error = self.vapi.cli("test counter simple expand")
26
27         if error:
28             self.logger.critical(error)
29             self.assertNotIn('failed', error)
30
31     def test_counter_combined_expand(self):
32         """ Combined Counter Expand """
33         error = self.vapi.cli("test counter combined expand")
34
35         if error:
36             self.logger.critical(error)
37             self.assertNotIn('failed', error)