test: fix failure in test_06_purge_expunged_vm_background_task (#10501)

Failures seen in https://github.com/apache/cloudstack/pull/10006#issuecomment-2691067265 and others.

With https://github.com/apache/cloudstack/pull/9773, the response of
listManagementServers API has been changed. serviceip has been renamed
to ipaddress. This was causing not all MS getting restarted and purge
b/g task not being able to run. The code handling API response in the
test has been updated.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2025-03-06 09:25:22 +05:30 committed by GitHub
parent cdf19b552c
commit 35a7438033
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -259,8 +259,8 @@ class TestPurgeExpungedVms(cloudstackTestCase):
active_server_ips = []
active_server_ips.append(self.mgtSvrDetails["mgtSvrIp"])
for idx, server in enumerate(servers):
if server.state == 'Up' and server.serviceip != self.mgtSvrDetails["mgtSvrIp"]:
active_server_ips.append(server.serviceip)
if server.state == 'Up' and server.ipaddress != self.mgtSvrDetails["mgtSvrIp"]:
active_server_ips.append(server.ipaddress)
return active_server_ips
def restartAllManagementServers(self):