Merge "Test VM reachability when metadata agent is down"

This commit is contained in:
Zuul 2020-10-19 08:11:28 +00:00 committed by Gerrit Code Review
commit 4102a2e452
1 changed files with 7 additions and 0 deletions

View File

@ -533,6 +533,13 @@ class MetadataAgentTest(BaseAgentTest):
self.start_service()
self.wait_for_metadata_status(is_reachable=True)
def test_vm_reachability_when_metadata_agent_is_down(self):
self.stop_service()
self.wait_for_metadata_status(is_reachable=False)
ping.ping_until_received(self.stack.ip_address).assert_replied()
self.start_service()
self.wait_for_metadata_status(is_reachable=True)
def parse_http_status(curl_output: str) -> int:
http_head = curl_output.split('\n', 1)[0]