Merge remote-tracking branch 'apache/4.18'

This commit is contained in:
Abhishek Kumar 2023-12-20 11:53:18 +05:30
commit f5c7018e5e

View File

@ -40,9 +40,14 @@ class TestHostPing(cloudstackTestCase):
self.services = self.testClient.getParsedTestDataConfig()
self.zone = get_zone(self.apiclient, self.testClient.getZoneForTests())
self.pod = get_pod(self.apiclient, self.zone.id)
self.original_host_state_map = {}
self.cleanup = []
def tearDown(self):
for host_id in self.original_host_state_map:
state = self.original_host_state_map[host_id]
sql_query = "UPDATE host SET status = '" + state + "' WHERE uuid = '" + host_id + "'"
self.dbConnection.execute(sql_query)
super(TestHostPing, self).tearDown()
def checkHostStateInCloudstack(self, state, host_id):
@ -92,6 +97,7 @@ class TestHostPing(cloudstackTestCase):
self.logger.debug('Hypervisor = {}'.format(host.id))
hostToTest = listHost[0]
self.original_host_state_map[hostToTest.id] = hostToTest.state
sql_query = "UPDATE host SET status = 'Alert' WHERE uuid = '" + hostToTest.id + "'"
self.dbConnection.execute(sql_query)