Corrected wrong references in the testpaths and skipped appropriately

This commit is contained in:
SrikanteswaraRao Talluri 2015-04-16 17:44:37 +05:30
parent 05e4ba7350
commit cfb5be761c
2 changed files with 10 additions and 1 deletions

View File

@ -170,6 +170,7 @@ class TestPathVMLC(cloudstackTestCase):
testClient = super(TestPathVMLC, cls).getClsTestClient()
cls.apiclient = testClient.getApiClient()
cls.testdata = testClient.getParsedTestDataConfig()
cls.hypervisor = testClient.getHypervisorInfo()
# Get Zone, Domain and templates
cls.domain = get_domain(cls.apiclient)
@ -336,6 +337,8 @@ class TestPathVMLC(cloudstackTestCase):
# 13. Find suitable host for VM to migrate and migrate the VM
# 14. Verify VM accessibility on new host
"""
if self.hypervisor.lower() == 'hyperv' and value == VPC_NETWORK:
self.skipTest("cann't be run for {} hypervisor".format(self.hypervisor))
# List created service offering in setUpClass by name
listServiceOfferings = ServiceOffering.list(
@ -733,6 +736,8 @@ class TestPathVMLC(cloudstackTestCase):
# 4. Try to stop the VM in destroyed state, operation should fail
# 5. Try to reboot the VM in destroyed state, operation should fail
"""
if self.hypervisor.lower() == 'hyperv' and value == VPC_NETWORK:
self.skipTest("cann't be run for {} hypervisor".format(self.hypervisor))
network = CreateNetwork(self, value)
networkid = network.id
@ -827,6 +832,9 @@ class TestPathVMLC(cloudstackTestCase):
# 6. Try to destroy the VM in expunging state, operation should fail
# 7. Try to recover the VM in expunging state, operation should fail
"""
if self.hypervisor.lower() == 'hyperv' and value == VPC_NETWORK:
self.skipTest("cann't be run for {} hypervisor".format(self.hypervisor))
network = CreateNetwork(self, value)
networkid = network.id

View File

@ -37,7 +37,8 @@ from marvin.lib.utils import cleanup_resources, validateList
from marvin.lib.common import (get_zone,
get_domain,
get_template,
list_virtual_machines)
list_virtual_machines,
find_storage_pool_type)
from nose.plugins.attrib import attr
import os
import urllib