From 4779e575bb3ff5748f70ba318d42675151c2f40b Mon Sep 17 00:00:00 2001 From: Sanjay Tripathi Date: Fri, 4 Apr 2014 14:30:59 +0530 Subject: [PATCH] CLOUDSTACK-5674: Minor fixes to BVT tests --- test/integration/smoke/test_network.py | 3 +-- test/integration/smoke/test_public_ip_range.py | 4 ++-- test/integration/smoke/test_secondary_storage.py | 2 ++ test/integration/smoke/test_vm_snapshots.py | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py index dc2e53eb1de..b5bdb449e46 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -230,10 +230,9 @@ class TestPortForwarding(cloudstackTestCase): testClient = super(TestPortForwarding, cls).getClsTestClient() cls.apiclient = testClient.getApiClient() cls.services = testClient.getParsedTestDataConfig() - # Get Zone, Domain and templates cls.domain = get_domain(cls.apiclient) - cls.zone = get_zone(cls.apiclient, cls.getZoneForTests()) + cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests()) template = get_template( cls.apiclient, cls.zone.id, diff --git a/test/integration/smoke/test_public_ip_range.py b/test/integration/smoke/test_public_ip_range.py index ca3c83bd873..0be7a19efa9 100644 --- a/test/integration/smoke/test_public_ip_range.py +++ b/test/integration/smoke/test_public_ip_range.py @@ -31,11 +31,11 @@ class TestDedicatePublicIPRange(cloudstackTestCase): @classmethod def setUpClass(cls): cls.testClient = super(TestDedicatePublicIPRange, cls).getClsTestClient() - cls.apiclient = cls.testClient.getApiClient() + cls.apiclient = cls.testClient.getApiClient() cls.services = cls.testClient.getParsedTestDataConfig() # Get Zone, Domain cls.domain = get_domain(cls.apiclient) - cls.zone = get_zone(cls.apiclient, cls.getClsTestClient.getZoneForTests()) + cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests()) # Create Account cls.account = Account.create( diff --git a/test/integration/smoke/test_secondary_storage.py b/test/integration/smoke/test_secondary_storage.py index d430beb4665..e7548a69248 100644 --- a/test/integration/smoke/test_secondary_storage.py +++ b/test/integration/smoke/test_secondary_storage.py @@ -187,6 +187,8 @@ class TestSecStorageServices(cloudstackTestCase): listall=True, account='system' ) + self.assertEqual(validateList(list_template_response)[0], PASS,\ + "templates list validation failed") # Ensure all BUILTIN templates are downloaded templateid = None diff --git a/test/integration/smoke/test_vm_snapshots.py b/test/integration/smoke/test_vm_snapshots.py index ca6af319434..6138a991d71 100644 --- a/test/integration/smoke/test_vm_snapshots.py +++ b/test/integration/smoke/test_vm_snapshots.py @@ -40,7 +40,7 @@ class TestVmSnapshot(cloudstackTestCase): cls.zone.id, cls.services["ostype"] ) - if cls.template == FAILED: + if template == FAILED: assert False, "get_template() failed to return template with description %s" % cls.services["ostype"] cls.services["domainid"] = cls.domain.id @@ -68,7 +68,7 @@ class TestVmSnapshot(cloudstackTestCase): accountid=cls.account.name, domainid=cls.account.domainid, serviceofferingid=cls.service_offering.id, - mode=cls.services["mode"] + mode=cls.zone.networktype ) cls.random_data_0 = random_gen(size=100) cls.test_dir = "/tmp"