Example #1
0
 def test_run_monitor(self, mock_monitor_run):
     test_hosting_vnf = MOCK_VNF_DEVICE
     test_hosting_vnf['device'] = {}
     test_boot_wait = 30
     mock_kwargs = {
         'count': 1,
         'monitoring_delay': 0,
         'interval': 0,
         'mgmt_ip': 'a.b.c.d',
         'timeout': 2
     }
     test_vnfmonitor = VNFMonitor(test_boot_wait)
     self.mock_monitor_manager.invoke = mock.MagicMock()
     test_vnfmonitor._monitor_manager = self.mock_monitor_manager
     test_vnfmonitor.run_monitor(test_hosting_vnf)
     self.mock_monitor_manager\
         .invoke.assert_called_once_with('ping', 'monitor_call', device={},
                                         kwargs=mock_kwargs)
Example #2
0
 def test_run_monitor(self, mock_monitor_run):
     test_hosting_vnf = MOCK_VNF_DEVICE
     test_hosting_vnf['device'] = {}
     test_boot_wait = 30
     mock_kwargs = {
         'count': 1,
         'monitoring_delay': 0,
         'interval': 0,
         'mgmt_ip': 'a.b.c.d',
         'timeout': 2
     }
     test_vnfmonitor = VNFMonitor(test_boot_wait)
     self.mock_monitor_manager.invoke = mock.MagicMock()
     test_vnfmonitor._monitor_manager = self.mock_monitor_manager
     test_vnfmonitor.run_monitor(test_hosting_vnf)
     self.mock_monitor_manager\
         .invoke.assert_called_once_with('ping', 'monitor_call', device={},
                                         kwargs=mock_kwargs)