You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ga...@apache.org on 2015/06/10 12:31:22 UTC

git commit: updated refs/heads/master to 84bc2e6

Repository: cloudstack
Updated Branches:
  refs/heads/master 5e41a830a -> 84bc2e612


CLOUDSTACK-8549: Update assert statements in testpath_disable_enable_zone.py

Signed-off-by: Gaurav Aradhye <ga...@clogeny.com>
This closes #382


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/84bc2e61
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/84bc2e61
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/84bc2e61

Branch: refs/heads/master
Commit: 84bc2e6127af72f984dc6e54cd90f44e806832b9
Parents: 5e41a83
Author: pritisarap12 <pr...@clogeny.com>
Authored: Wed Jun 10 15:18:53 2015 +0530
Committer: Gaurav Aradhye <ga...@clogeny.com>
Committed: Wed Jun 10 15:59:45 2015 +0530

----------------------------------------------------------------------
 .../maint/testpath_disable_enable_zone.py       | 63 ++++++++++++--------
 1 file changed, 38 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/84bc2e61/test/integration/component/maint/testpath_disable_enable_zone.py
----------------------------------------------------------------------
diff --git a/test/integration/component/maint/testpath_disable_enable_zone.py b/test/integration/component/maint/testpath_disable_enable_zone.py
index ec7c059..a4c7bdc 100644
--- a/test/integration/component/maint/testpath_disable_enable_zone.py
+++ b/test/integration/component/maint/testpath_disable_enable_zone.py
@@ -225,6 +225,19 @@ class TestDisableEnableZone(cloudstackTestCase):
             type='ROOT',
             listall=True
         )
+        root_vm_new = VirtualMachine.create(
+            self.apiclient,
+            self.testdata["small"],
+            templateid=self.template.id,
+            accountid=self.account.name,
+            domainid=self.account.domainid,
+            serviceofferingid=self.service_offering.id,
+            zoneid=self.zone.id
+        )
+
+        self.assertEqual(root_vm_new.state.lower(),
+                         "running",
+                         "Verify that admin should create new VM")
 
         if self.snapshotSupported:
             Snapshot.create(
@@ -334,9 +347,9 @@ class TestDisableEnableZone(cloudstackTestCase):
             zoneid=self.zone.id
         )
 
-        self.assertNotEqual(root_vm_new.state.lower(),
-                            "running",
-                            "Verify that admin should create new VM")
+        self.assertEqual(root_vm_new.state.lower(),
+                         "running",
+                         "Verify that admin should create new VM")
 
         if self.snapshotSupported:
             Snapshot.create(
@@ -386,9 +399,9 @@ class TestDisableEnableZone(cloudstackTestCase):
             zoneid=self.zone.id
         )
 
-        self.assertNotEqual(user_vm_new.state.lower(),
-                            "running",
-                            "Verify that admin should create new VM")
+        self.assertEqual(user_vm_new.state.lower(),
+                         "running",
+                         "Verify that admin should create new VM")
 
         if self.snapshotSupported:
             Snapshot.create(
@@ -693,9 +706,9 @@ class TestDisableEnablePod(cloudstackTestCase):
             serviceofferingid=self.service_offering.id,
             zoneid=self.zone.id,
         )
-        self.assertNotEqual(root_vm_new.state.lower(),
-                            "running",
-                            "Verify that admin should be able \
+        self.assertEqual(root_vm_new.state.lower(),
+                         "running",
+                         "Verify that admin should be able \
                                     to create new VM")
 
         if self.snapshotSupported:
@@ -745,9 +758,9 @@ class TestDisableEnablePod(cloudstackTestCase):
             serviceofferingid=self.service_offering.id,
             zoneid=self.zone.id,
         )
-        self.assertNotEqual(user_vm_new.state.lower(),
-                            "running",
-                            "Verify that admin should create new VM")
+        self.assertEqual(user_vm_new.state.lower(),
+                         "running",
+                         "Verify that admin should create new VM")
 
         if self.snapshotSupported:
             Snapshot.create(
@@ -1081,9 +1094,9 @@ class TestDisableEnableCluster(cloudstackTestCase):
             zoneid=self.zone.id,
         )
 
-        self.assertNotEqual(root_vm_new.state.lower(),
-                            "running",
-                            "Verify that admin should create new VM")
+        self.assertEqual(root_vm_new.state.lower(),
+                         "running",
+                         "Verify that admin should create new VM")
 
         if self.snapshotSupported:
             Snapshot.create(
@@ -1101,9 +1114,9 @@ class TestDisableEnableCluster(cloudstackTestCase):
             zoneid=self.zone.id,
         )
 
-        self.assertNotEqual(user_vm_new.state.lower(),
-                            "running",
-                            "Verify that admin should create new VM")
+        self.assertEqual(user_vm_new.state.lower(),
+                         "running",
+                         "Verify that admin should create new VM")
 
         if self.snapshotSupported:
             Snapshot.create(
@@ -1224,9 +1237,9 @@ class TestDisableEnableCluster(cloudstackTestCase):
             zoneid=self.zone.id,
         )
 
-        self.assertNotEqual(root_vm_new.state.lower(),
-                            "running",
-                            "Verify that admin should create new VM")
+        self.assertEqual(root_vm_new.state.lower(),
+                         "running",
+                         "Verify that admin should create new VM")
 
         # Step 5
         # Deletion of zone should fail if resources are running on the zone
@@ -1460,7 +1473,7 @@ class TestDisableEnableHost(cloudstackTestCase):
             zoneid=self.zone.id,
             hostid=hostid)
 
-        self.assertNotEqual(
+        self.assertEqual(
             root_vm_new.state.lower(),
             "running",
             "Verify that admin should create new VM in running state")
@@ -1481,9 +1494,9 @@ class TestDisableEnableHost(cloudstackTestCase):
             zoneid=self.zone.id,
         )
 
-        self.assertNotEqual(user_vm_new.state.lower(),
-                            "running",
-                            "Verify that admin should create new VM")
+        self.assertEqual(user_vm_new.state.lower(),
+                         "running",
+                         "Verify that admin should create new VM")
 
         if self.snapshotSupported:
             Snapshot.create(