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:
Prasanna Santhanam 2013-05-22 15:40:01 +05:30
parent a67728b312
commit 698da2a279
3 changed files with 314 additions and 308 deletions

View File

@ -31,6 +31,8 @@ from marvin.integration.lib.utils import cleanup_resources
#common - commonly used methods for all tests are listed here
from marvin.integration.lib.common import get_zone, get_domain, get_template
from nose.plugins.attrib import attr
class TestData(object):
"""Test data object that is required to create resources
"""
@ -94,6 +96,7 @@ class TestDeployVM(cloudstackTestCase):
self.account
]
@attr(tags = ['advanced', 'simulator', 'basic', 'sg'])
def test_deploy_vm(self):
"""Test Deploy Virtual Machine

View File

@ -41,6 +41,7 @@ class TestPVLAN(cloudstackTestCase):
def setUp(self):
self.apiClient = self.testClient.getApiClient()
@attr(tags = ["advanced"])
def test_create_pvlan_network(self):
self.debug("Test create pvlan network")
createNetworkCmd = createNetwork.createNetworkCmd()

View File

@ -23,7 +23,6 @@ from marvin.cloudstackAPI import *
from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
from marvin.remoteSSHClient import remoteSSHClient
class Services:
"""Test Snapshots Services
@ -152,6 +151,8 @@ class TestVmSnapshot(cloudstackTestCase):
@attr(tags=["advanced", "advancedns", "smoke"])
def test_01_create_vm_snapshots(self):
"""Test to create VM snapshots
"""
try:
# Login to VM and write data to file system
@ -194,6 +195,9 @@ class TestVmSnapshot(cloudstackTestCase):
@attr(tags=["advanced", "advancedns", "smoke"])
def test_02_revert_vm_snapshots(self):
"""Test to revert VM snapshots
"""
try:
ssh_client = self.virtual_machine.get_ssh_client()
@ -275,8 +279,11 @@ class TestVmSnapshot(cloudstackTestCase):
result[0],
"Check the random data is equal with the ramdom file!"
)
@attr(tags=["advanced", "advancedns", "smoke"])
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)
@ -290,11 +297,6 @@ class TestVmSnapshot(cloudstackTestCase):
None,
"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)
time.sleep(self.services["sleep"]*3)