Skip to content

Commit 32e5951

Browse files
authored
Apply suggestions from code review
Co-authored-by: dahn <daan.hoogland@gmail.com>
1 parent 10a0404 commit 32e5951

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

test/integration/smoke/test_deploy_vm_iso.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,15 @@ def test_deploy_vm_from_iso(self):
113113
self.cleanup.append(self.iso)
114114

115115
self.debug("ISO created with ID: %s" % self.iso.id)
116-
117116
list_iso_response = Iso.list(
118117
self.apiclient,
119118
id=self.iso.id
120119
)
121-
self.assertEqual(
122-
isinstance(list_iso_response, list),
123-
True,
124-
"Check list response returns a valid list"
125-
)
120+
while not isinstance(list_iso_response, list):
121+
list_iso_response = Iso.list(
122+
self.apiclient,
123+
id=self.iso.id
124+
)
126125

127126
try:
128127
# Download the ISO
@@ -163,11 +162,10 @@ def test_deploy_vm_from_iso(self):
163162
VirtualMachine.RUNNING
164163
)
165164

166-
self.assertEqual(
167-
vm_state,
168-
VirtualMachine.RUNNING,
169-
"Check virtual machine is in running state"
170-
)
165+
response = self.virtual_machine.getState(
166+
self.apiclient,
167+
VirtualMachine.RUNNING)
168+
self.assertEqual(response[0], PASS, response[1])
171169

172170
self.assertEqual(
173171
vm_response.isoid,

0 commit comments

Comments
 (0)