mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Minor tagging and comments in tests
Adding tags to the deployvm test from the marvin tutorial Adding docstrings to the vm snapshot tests Add tag to the pvlan test Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
a67728b312
commit
698da2a279
@ -31,6 +31,8 @@ from marvin.integration.lib.utils import cleanup_resources
|
|||||||
#common - commonly used methods for all tests are listed here
|
#common - commonly used methods for all tests are listed here
|
||||||
from marvin.integration.lib.common import get_zone, get_domain, get_template
|
from marvin.integration.lib.common import get_zone, get_domain, get_template
|
||||||
|
|
||||||
|
from nose.plugins.attrib import attr
|
||||||
|
|
||||||
class TestData(object):
|
class TestData(object):
|
||||||
"""Test data object that is required to create resources
|
"""Test data object that is required to create resources
|
||||||
"""
|
"""
|
||||||
@ -94,6 +96,7 @@ class TestDeployVM(cloudstackTestCase):
|
|||||||
self.account
|
self.account
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@attr(tags = ['advanced', 'simulator', 'basic', 'sg'])
|
||||||
def test_deploy_vm(self):
|
def test_deploy_vm(self):
|
||||||
"""Test Deploy Virtual Machine
|
"""Test Deploy Virtual Machine
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,7 @@ class TestPVLAN(cloudstackTestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.apiClient = self.testClient.getApiClient()
|
self.apiClient = self.testClient.getApiClient()
|
||||||
|
|
||||||
|
@attr(tags = ["advanced"])
|
||||||
def test_create_pvlan_network(self):
|
def test_create_pvlan_network(self):
|
||||||
self.debug("Test create pvlan network")
|
self.debug("Test create pvlan network")
|
||||||
createNetworkCmd = createNetwork.createNetworkCmd()
|
createNetworkCmd = createNetwork.createNetworkCmd()
|
||||||
|
|||||||
@ -23,7 +23,6 @@ from marvin.cloudstackAPI import *
|
|||||||
from marvin.integration.lib.utils import *
|
from marvin.integration.lib.utils import *
|
||||||
from marvin.integration.lib.base import *
|
from marvin.integration.lib.base import *
|
||||||
from marvin.integration.lib.common import *
|
from marvin.integration.lib.common import *
|
||||||
from marvin.remoteSSHClient import remoteSSHClient
|
|
||||||
|
|
||||||
class Services:
|
class Services:
|
||||||
"""Test Snapshots Services
|
"""Test Snapshots Services
|
||||||
@ -152,6 +151,8 @@ class TestVmSnapshot(cloudstackTestCase):
|
|||||||
|
|
||||||
@attr(tags=["advanced", "advancedns", "smoke"])
|
@attr(tags=["advanced", "advancedns", "smoke"])
|
||||||
def test_01_create_vm_snapshots(self):
|
def test_01_create_vm_snapshots(self):
|
||||||
|
"""Test to create VM snapshots
|
||||||
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Login to VM and write data to file system
|
# Login to VM and write data to file system
|
||||||
@ -194,6 +195,9 @@ class TestVmSnapshot(cloudstackTestCase):
|
|||||||
|
|
||||||
@attr(tags=["advanced", "advancedns", "smoke"])
|
@attr(tags=["advanced", "advancedns", "smoke"])
|
||||||
def test_02_revert_vm_snapshots(self):
|
def test_02_revert_vm_snapshots(self):
|
||||||
|
"""Test to revert VM snapshots
|
||||||
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ssh_client = self.virtual_machine.get_ssh_client()
|
ssh_client = self.virtual_machine.get_ssh_client()
|
||||||
|
|
||||||
@ -275,8 +279,11 @@ class TestVmSnapshot(cloudstackTestCase):
|
|||||||
result[0],
|
result[0],
|
||||||
"Check the random data is equal with the ramdom file!"
|
"Check the random data is equal with the ramdom file!"
|
||||||
)
|
)
|
||||||
|
|
||||||
@attr(tags=["advanced", "advancedns", "smoke"])
|
@attr(tags=["advanced", "advancedns", "smoke"])
|
||||||
def test_03_delete_vm_snapshots(self):
|
def test_03_delete_vm_snapshots(self):
|
||||||
|
"""Test to delete vm snapshots
|
||||||
|
"""
|
||||||
|
|
||||||
list_snapshot_response = VmSnapshot.list(self.apiclient,vmid=self.virtual_machine.id,listall=True)
|
list_snapshot_response = VmSnapshot.list(self.apiclient,vmid=self.virtual_machine.id,listall=True)
|
||||||
|
|
||||||
@ -290,11 +297,6 @@ class TestVmSnapshot(cloudstackTestCase):
|
|||||||
None,
|
None,
|
||||||
"Check if snapshot exists in ListSnapshot"
|
"Check if snapshot exists in ListSnapshot"
|
||||||
)
|
)
|
||||||
"""
|
|
||||||
cmd = deleteVMSnapshot.deleteVMSnapshotCmd()
|
|
||||||
cmd.vmsnapshotid = list_snapshot_response[0].id
|
|
||||||
self.apiclient.deleteVMSnapshot(cmd)
|
|
||||||
"""
|
|
||||||
VmSnapshot.deleteVMSnapshot(self.apiclient,list_snapshot_response[0].id)
|
VmSnapshot.deleteVMSnapshot(self.apiclient,list_snapshot_response[0].id)
|
||||||
|
|
||||||
time.sleep(self.services["sleep"]*3)
|
time.sleep(self.services["sleep"]*3)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user