FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

CLOUDSTACK-8549:Update assert statements in testpath_disable_enable_zone.py… by pritisarap12 · Pull Request #382 · apache/cloudstack · GitHub

Repository navigation

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,19 @@ def test_01_disable_enable_zone(self):
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(
Expand Down Expand Up @@ -334,9 +347,9 @@ def test_01_disable_enable_zone(self):
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(
Expand Down Expand Up @@ -386,9 +399,9 @@ def test_01_disable_enable_zone(self):
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(
Expand Down Expand Up @@ -693,9 +706,9 @@ def test_01_disable_enable_pod(self):
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:
Expand Down Expand Up @@ -745,9 +758,9 @@ def test_01_disable_enable_pod(self):
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(
Expand Down Expand Up @@ -1081,9 +1094,9 @@ def test_01_disable_enable_cluster(self):
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(
Expand All @@ -1101,9 +1114,9 @@ def test_01_disable_enable_cluster(self):
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(
Expand Down Expand Up @@ -1224,9 +1237,9 @@ def test_01_disable_enable_cluster(self):
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
Expand Down Expand Up @@ -1460,7 +1473,7 @@ def test_01_disable_enable_host(self):
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")
Expand All @@ -1481,9 +1494,9 @@ def test_01_disable_enable_host(self):
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(
Expand Down

Back | FazBrowse Home | New Git URL