Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 40B75114E1 for ; Thu, 24 Jul 2014 14:48:48 +0000 (UTC) Received: (qmail 92919 invoked by uid 500); 24 Jul 2014 14:48:47 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 92887 invoked by uid 500); 24 Jul 2014 14:48:47 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 92878 invoked by uid 99); 24 Jul 2014 14:48:47 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2014 14:48:47 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 74FF99B2D7F; Thu, 24 Jul 2014 14:48:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: girish@apache.org To: commits@cloudstack.apache.org Message-Id: <7ba70b885fdf485d92b7efef4d4b5fca@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 49005b3 Date: Thu, 24 Jul 2014 14:48:47 +0000 (UTC) Repository: cloudstack Updated Branches: refs/heads/master 78a6d557f -> 49005b324 CLOUDSTACK-7125: Fixed test_blocker_bugs.py, added code to wait for snapshots to be in 'BackedU' state Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/49005b32 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/49005b32 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/49005b32 Branch: refs/heads/master Commit: 49005b324f18e19166bcbb801bcd07609e44d8db Parents: 78a6d55 Author: Gaurav Aradhye Authored: Thu Jul 24 15:21:28 2014 +0530 Committer: Girish Shilamkar Committed: Thu Jul 24 20:30:48 2014 +0530 ---------------------------------------------------------------------- test/integration/component/test_blocker_bugs.py | 45 +++----------------- 1 file changed, 5 insertions(+), 40 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/49005b32/test/integration/component/test_blocker_bugs.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_blocker_bugs.py b/test/integration/component/test_blocker_bugs.py index ba15b18..f0b03c0 100644 --- a/test/integration/component/test_blocker_bugs.py +++ b/test/integration/component/test_blocker_bugs.py @@ -863,26 +863,9 @@ class TestTemplates(cloudstackTestCase): account=self.account.name, domainid=self.account.domainid ) - self.debug("Created snapshot with ID: %s" % snapshot.id) - snapshots = Snapshot.list( - self.apiclient, - id=snapshot.id - ) - self.assertEqual( - isinstance(snapshots, list), - True, - "Check list response returns a valid list" - ) - self.assertNotEqual( - snapshots, - None, - "Check if result exists in list snapshots call" - ) - self.assertEqual( - snapshots[0].id, - snapshot.id, - "Check snapshot id in list resources call" - ) + + response = snapshot.validateState(self.apiclient, Snapshot.BACKED_UP) + self.assertEqual(response[0], PASS, response[1]) # Generate template from the snapshot template = Template.create_from_snapshot( @@ -945,26 +928,8 @@ class TestTemplates(cloudstackTestCase): account=self.account.name, domainid=self.account.domainid ) - self.debug("Created snapshot with ID: %s" % snapshot.id) - snapshots = Snapshot.list( - self.apiclient, - id=snapshot.id - ) - self.assertEqual( - isinstance(snapshots, list), - True, - "Check list response returns a valid list" - ) - self.assertNotEqual( - snapshots, - None, - "Check if result exists in list snapshots call" - ) - self.assertEqual( - snapshots[0].id, - snapshot.id, - "Check snapshot id in list resources call" - ) + response = snapshot.validateState(self.apiclient, Snapshot.BACKED_UP) + self.assertEqual(response[0], PASS, response[1]) # Generate template from the snapshot template = Template.create_from_snapshot(