aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/network_services/nfvi
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-10-10 15:03:22 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-10-12 20:48:25 +0000
commit6a904a3a1b84e52861dcf4bf60332a666ae08b84 (patch)
tree377c068c45a4d6c64395e55cbb77190647ab3686 /tests/unit/network_services/nfvi
parenta574265d16de75c904282b7ea0e2544b28a7996e (diff)
collectd: set intel_pmu events path and OVS socket path
switch from hardcoded path to dynamic path based on bin_path also enable proxy for install_collectd add barometer settings for virt and ovs_stats Change-Id: Id138aef548332a3e3fcb3963b746e7c9f10c0948 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'tests/unit/network_services/nfvi')
-rw-r--r--tests/unit/network_services/nfvi/test_resource.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/unit/network_services/nfvi/test_resource.py b/tests/unit/network_services/nfvi/test_resource.py
index 799cc202b..f3244fdbd 100644
--- a/tests/unit/network_services/nfvi/test_resource.py
+++ b/tests/unit/network_services/nfvi/test_resource.py
@@ -134,6 +134,14 @@ class TestResourceProfile(unittest.TestCase):
self.assertIsNone(
self.resource_profile._prepare_collectd_conf("/opt/nsb_bin"))
+ def test__setup_intel_pmu(self):
+ self.assertIsNone(
+ self.resource_profile._setup_intel_pmu(self.ssh_mock, "/opt/nsb_bin"))
+
+ def test__setup_ovs_stats(self):
+ self.assertIsNone(
+ self.resource_profile._setup_ovs_stats(self.ssh_mock))
+
@mock.patch("yardstick.network_services.nfvi.resource.open")
@mock.patch("yardstick.network_services.nfvi.resource.os")
def test__provide_config_file(self, mock_open, mock_os):
@@ -187,7 +195,6 @@ class TestResourceProfile(unittest.TestCase):
res = self.resource_profile.parse_collectd_result({})
expected_result = {'cpu': {}, 'dpdkstat': {}, 'hugepages': {},
'memory': {}, 'ovs_stats': {}, 'timestamp': '',
- 'intel_pmu': {},
'virt': {}}
self.assertDictEqual(res, expected_result)
@@ -200,7 +207,6 @@ class TestResourceProfile(unittest.TestCase):
res = self.resource_profile.parse_collectd_result(metric)
expected_result = {'cpu': {1: {'ipc': '1234'}}, 'dpdkstat': {}, 'hugepages': {},
'memory': {}, 'ovs_stats': {}, 'timestamp': '',
- 'intel_pmu': {},
'virt': {}}
self.assertDictEqual(res, expected_result)
@@ -209,7 +215,6 @@ class TestResourceProfile(unittest.TestCase):
res = self.resource_profile.parse_collectd_result(metric)
expected_result = {'cpu': {}, 'dpdkstat': {}, 'hugepages': {},
'memory': {'bw': '101'}, 'ovs_stats': {}, 'timestamp': '',
- 'intel_pmu': {},
'virt': {}}
self.assertDictEqual(res, expected_result)
@@ -220,7 +225,6 @@ class TestResourceProfile(unittest.TestCase):
res = self.resource_profile.parse_collectd_result(metric)
expected_result = {'cpu': {}, 'dpdkstat': {}, 'hugepages': {'free': '101'},
'memory': {}, 'ovs_stats': {}, 'timestamp': '',
- 'intel_pmu': {},
'virt': {}}
self.assertDictEqual(res, expected_result)
@@ -237,7 +241,6 @@ class TestResourceProfile(unittest.TestCase):
res = self.resource_profile.parse_collectd_result(metric)
expected_result = {'cpu': {}, 'dpdkstat': {'tx': '101'}, 'hugepages': {},
'memory': {}, 'ovs_stats': {'tx': '101'}, 'timestamp': '',
- 'intel_pmu': {},
'virt': {'memory': '101'}}
self.assertDictEqual(res, expected_result)