mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
fix(instances): a paused VM's guest agent counts as not read
A paused guest cannot answer its agent, so the address search and the VM report asked it nothing, but counted the VM neither as without an agent nor as not read: the coverage line read as if every address had been seen. It now counts among the agents not read, and the line names the paused case.
This commit is contained in:
parent
ecb850739f
commit
a6218df6b2
4 changed files with 18 additions and 8 deletions
|
|
@ -171,6 +171,13 @@ class FindTests(unittest.TestCase):
|
|||
result = self.find(addresses.Target(c, None))
|
||||
self.assertEqual((result["checked"], result["no_agent"]), (2, 1))
|
||||
|
||||
def test_a_paused_vm_with_an_agent_is_an_agent_not_read(self):
|
||||
# a paused guest cannot answer its agent: not "checked and empty"
|
||||
paused = FakeDomain({ARP: {"e": iface(MAC1, (0, "192.0.2.10", 24))}}, state=3)
|
||||
result = self.find(addresses.Target(compute("c1", paused), None))
|
||||
self.assertEqual((result["checked"], result["no_agent"], result["unread"]), (1, 0, 1))
|
||||
self.assertEqual([m["sources"] for m in result["matches"]], [["ARP"]])
|
||||
|
||||
def test_a_hung_agent_does_not_hold_the_answer(self):
|
||||
hung = threading.Event()
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue