Skip to content

Commit

Permalink
Fix #968
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Jan 8, 2020
1 parent 07f7844 commit f5e64b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions IM/VirtualMachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ def check_ctxt_process(self):
try:
self.log_info("Getting status of ctxt process with pid: " + str(ctxt_pid))
(_, _, exit_status) = ssh.execute("ps " + str(ctxt_pid))
self.ssh_connect_errors = 0
except Exception as ex:
self.log_warn("Error getting status of ctxt process with pid: %s. %s" % (ctxt_pid, ex))
exit_status = 0
Expand Down
4 changes: 3 additions & 1 deletion test/unit/VirtualMachine.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ def test_get_ctxt_log(self, mkdtemp, get_ssh_ansible_master):
with open('/tmp/test_get_ctxt/ctxt_agent.log', 'w+') as f:
f.write("cont_log")

vm = VirtualMachine(None, "1", None, None, None)
inf = MagicMock()
inf.id = "1"
vm = VirtualMachine(inf, "1", None, None, None)
cont_log = vm.get_ctxt_log("", delete=True)
self.assertEqual(cont_log, "cont_log")

Expand Down

0 comments on commit f5e64b5

Please sign in to comment.