CLOUDSTACK-8161: fixed few more wrong references in the tests while

disabling LXC unsupported tests.
This commit is contained in:
SrikanteswaraRao Talluri 2015-02-08 00:36:01 +05:30
parent b9f705f238
commit b3cebdbbf4
11 changed files with 23 additions and 16 deletions

View File

@ -20,7 +20,7 @@
"""
# Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackAPI import (prepareHostForMaintenance,
cancelHostMaintenance)
from marvin.lib.utils import cleanup_resources

View File

@ -2082,9 +2082,9 @@ class TestNetworksInAdvancedSG_VmOperations(cloudstackTestCase):
# 1. VM migration should be successful
#Create admin account
if cls.hypervisor.lower() in ['lxc']:
raise unittest.SkipTest("Template creation from root volume is not supported in LXC")
self.hypervisor = self.testClient.getHypervisorInfo()
if self.hypervisor.lower() in ['lxc']:
self.skipTest("vm migrate is not supported in LXC")
hosts = Host.list(self.api_client, zoneid=self.zone.id)
self.assertEqual(validateList(hosts)[0], PASS, "hosts list validation failed, list is %s" % hosts)

View File

@ -528,9 +528,9 @@ class TestBaseImageUpdate(cloudstackTestCase):
1) New root disk should be formed
2) The recurring snapshot rule should be deleted
"""
cls.hypervisor = cls.testClient.getHypervisorInfo()
if cls.hypervisor.lower() in ['lxc']:
raise unittest.SkipTest("Template creation from root volume is not supported in LXC")
self.hypervisor = self.testClient.getHypervisorInfo()
if self.hypervisor.lower() in ['lxc']:
self.skipTest("snapshot creation is not supported in LXC")
vms = VirtualMachine.list(
self.apiclient,
id=self.vm_with_reset.id,

View File

@ -1262,7 +1262,7 @@ class TestAccountLimits(cloudstackTestCase):
# Fill services from the external config file
cls.services = cloudstackTestClient.getParsedTestDataConfig()
cls.hypervisor = self.testClient.getHypervisorInfo()
cls.hypervisor = cls.testClient.getHypervisorInfo()
if cls.hypervisor.lower() in ['lxc']:
raise unittest.SkipTest("dynamic scaling feature is not supported on %s" % cls.hypervisor.lower())
@ -1602,7 +1602,7 @@ class TestAffinityGroup(cloudstackTestCase):
# Fill services from the external config file
cls.services = cloudstackTestClient.getParsedTestDataConfig()
cls.hypervisor = self.testClient.getHypervisorInfo()
cls.hypervisor = cls.testClient.getHypervisorInfo()
if cls.hypervisor.lower() in ['lxc']:
raise unittest.SkipTest("dynamic scaling feature is not supported on %s" % cls.hypervisor.lower())

View File

@ -2687,7 +2687,7 @@ class TestInstances(cloudstackTestCase):
"""
self.hypervisor = self.testClient.getHypervisorInfo()
if self.hypervisor.lower() == 'lxc':
if not find_storage_pool_type(cls.api_client, storagetype='rbd'):
if not find_storage_pool_type(self.api_client, storagetype='rbd'):
self.skipTest("RBD storage type is required for data volumes for LXC")
# Listing all the VM's for a User
list_vms_before = VirtualMachine.list(

View File

@ -18,7 +18,7 @@
"""
#Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.lib.base import (VirtualMachine,
Account,
Project,

View File

@ -39,7 +39,8 @@ from marvin.lib.common import (get_domain,
get_template,
createSnapshotFromVirtualMachineVolume,
isVmExpunged,
isDomainResourceCountEqualToExpectedCount)
isDomainResourceCountEqualToExpectedCount,
find_storage_pool_type)
from marvin.lib.utils import (cleanup_resources)
from marvin.codes import (PASS,
FAIL,

View File

@ -18,7 +18,7 @@
"""
# Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackAPI import (listHypervisorCapabilities,
attachIso,
deleteVolume)

View File

@ -24,6 +24,7 @@ from marvin.lib.utils import *
from marvin.lib.base import *
from marvin.lib.common import *
from nose.plugins.attrib import attr
import pdb
_multiprocess_shared_ = True
@ -45,7 +46,7 @@ class TestCreateDiskOffering(cloudstackTestCase):
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "smoke"], required_hardware="false")
@attr(tags = ["advanced", "basic", "eip", "sg", "advancedns", "smoke", "test"], required_hardware="false")
def test_01_create_disk_offering(self):
"""Test to create disk offering
@ -65,6 +66,7 @@ class TestCreateDiskOffering(cloudstackTestCase):
self.apiclient,
id=disk_offering.id
)
pdb.set_trace()
self.assertEqual(
isinstance(list_disk_response, list),
True,

View File

@ -17,7 +17,7 @@
"""Utilities functions
"""
# All tests inherit from cloudstackTestCase
from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
# Import Integration Libraries
from marvin.codes import FAILED, PASS
# base - contains all resources as entities and defines create, delete,

View File

@ -243,8 +243,12 @@ class DeployDataCenters(object):
primarycmd.podid = podId
primarycmd.tags = primary.tags
primarycmd.url = primary.url
if primary.scope.lower() == 'zone':
primarycmd.scope = primary.scope
else:
primarycmd.clusterid = clusterId
primarycmd.zoneid = zoneId
primarycmd.clusterid = clusterId
ret = self.__apiClient.createStoragePool(primarycmd)
if ret.id:
self.__tcRunLogger.debug(