Skip to content

Commit d0c9a0a

Browse files
borisstoyanovyadvr
authored andcommitted
tests: Adding a try catch for Xen licensing issue (#3061)
Adds a skip if the exception is related to licensing of the particular host, for the scaleVM API test.
1 parent 82cdf1c commit d0c9a0a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

test/integration/smoke/test_scale_vm.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,14 @@ def test_01_scale_vm(self):
159159
cmd = scaleVirtualMachine.scaleVirtualMachineCmd()
160160
cmd.serviceofferingid = self.big_offering.id
161161
cmd.id = self.virtual_machine.id
162-
self.apiclient.scaleVirtualMachine(cmd)
162+
163+
try:
164+
self.apiclient.scaleVirtualMachine(cmd)
165+
except Exception as e:
166+
if "LicenceRestriction" in str(e):
167+
self.skipTest("Your XenServer License does not allow scaling")
168+
else:
169+
self.fail("Scaling failed with the following exception: " + str(e))
163170

164171
list_vm_response = VirtualMachine.list(
165172
self.apiclient,

0 commit comments

Comments
 (0)