Esempio n. 1
0
 def test_collect_kpi(self, ssh):
     mock_ssh(ssh)
     vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
     trex_traffic_gen = TrexTrafficGen(NAME, vnfd)
     trex_traffic_gen.resource_helper._queue.put({})
     result = trex_traffic_gen.collect_kpi()
     self.assertEqual({}, result)
Esempio n. 2
0
 def test_collect_kpi(self):
     with mock.patch("yardstick.ssh.SSH") as ssh:
         vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
         ssh_mock = mock.Mock(autospec=ssh.SSH)
         ssh_mock.execute = \
             mock.Mock(return_value=(0, "", ""))
         ssh.from_node.return_value = ssh_mock
         vnfd = self.VNFD['vnfd:vnfd-catalog']['vnfd'][0]
         trex_traffic_gen = TrexTrafficGen(vnfd)
         trex_traffic_gen._queue.put({})
         restult = trex_traffic_gen.collect_kpi()
         self.assertEqual({}, restult)