From b0b7366493d0dabf5d886c6eea07cd0fc055264d Mon Sep 17 00:00:00 2001 From: DanielMartinBuckley Date: Fri, 16 Feb 2018 15:39:41 +0000 Subject: Addition of storage of extra counters for Grafana JIRA: YARDSTICK-1036 This stores a number of extra counters in influxdb for Prox test cases. It also stores existing counters with a "succcess_" tag. Previously throughput where stored without success or failure indication. Also "Result_" counters are also stored. These can now be used by Grafana to graph output. Change-Id: Ie5636c14ecbab1b53a988bdfbd47ddd1fcdbd695 Signed-off-by: Daniel Martin Buckley --- tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py') diff --git a/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py b/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py index 769279066..08be4865b 100644 --- a/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py +++ b/tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py @@ -131,6 +131,8 @@ class TestProxApproxVnf(unittest.TestCase): 'packets_in', 'packets_fwd', 'packets_dropped', + 'curr_packets_fwd', + 'curr_packets_in' ], }, 'connection-point': [ @@ -329,7 +331,7 @@ class TestProxApproxVnf(unittest.TestCase): 'packets_in': 0, 'packets_dropped': 0, 'packets_fwd': 0, - 'collect_stats': {'core': {}}, + 'collect_stats': {'core': {}} } result = prox_approx_vnf.collect_kpi() self.assertEqual(result, expected) @@ -352,7 +354,11 @@ class TestProxApproxVnf(unittest.TestCase): 'collect_stats': {'core': {'result': 234}}, } result = prox_approx_vnf.collect_kpi() - self.assertEqual(result, expected) + self.assertEqual(result['packets_in'], expected['packets_in']) + self.assertEqual(result['packets_dropped'], expected['packets_dropped']) + self.assertEqual(result['packets_fwd'], expected['packets_fwd']) + self.assertNotEqual(result['packets_fwd'], 0) + self.assertNotEqual(result['packets_fwd'], 0) @mock.patch(SSH_HELPER) def test_collect_kpi_error(self, ssh, *args): -- cgit 1.2.3-korg