This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push:
new d0c9a0a tests: Adding a try catch for Xen licensing issue (#3061)
d0c9a0a is described below
commit d0c9a0a23b72409142bc66be053de264b7dad4ce
Author: Boris Stoyanov - a.k.a Bobby <[email protected]>
AuthorDate: Wed Nov 28 13:07:14 2018 +0200
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.
---
test/integration/smoke/test_scale_vm.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/test/integration/smoke/test_scale_vm.py
b/test/integration/smoke/test_scale_vm.py
index e4d7b40..ddd6bcf 100644
--- a/test/integration/smoke/test_scale_vm.py
+++ b/test/integration/smoke/test_scale_vm.py
@@ -159,7 +159,14 @@ class TestScaleVm(cloudstackTestCase):
cmd = scaleVirtualMachine.scaleVirtualMachineCmd()
cmd.serviceofferingid = self.big_offering.id
cmd.id = self.virtual_machine.id
- self.apiclient.scaleVirtualMachine(cmd)
+
+ try:
+ self.apiclient.scaleVirtualMachine(cmd)
+ except Exception as e:
+ if "LicenceRestriction" in str(e):
+ self.skipTest("Your XenServer License does not allow scaling")
+ else:
+ self.fail("Scaling failed with the following exception: " +
str(e))
list_vm_response = VirtualMachine.list(
self.apiclient,