Add tags for QE metrics and arrange import order
Change-Id: I632a538ecfa63660a9668d75000ba127c113c1e8
This commit is contained in:
parent
3d7a29a689
commit
9eabeb60ec
|
@ -13,11 +13,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.decorators import (
|
||||
data_driven_test, DataDrivenFixture)
|
||||
from cloudcafe.common.tools.datagen import random_string
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
|
||||
from cloudroast.blockstorage.volumes_api.integration.compute.fixtures \
|
||||
import ComputeIntegrationTestFixture
|
||||
from cloudroast.blockstorage.volumes_api.integration.compute.datasets \
|
||||
|
@ -27,22 +28,26 @@ from cloudroast.blockstorage.volumes_api.integration.compute.datasets \
|
|||
@DataDrivenFixture
|
||||
class BootFromVolumeIntegrationTests(ComputeIntegrationTestFixture):
|
||||
|
||||
@tags('positive', 'integration')
|
||||
@data_driven_test(bfv_datasets.images)
|
||||
def ddtest_non_asserting_min_disk_check_for_image(self, image):
|
||||
"""Check if the image has min disk attribute set, print a
|
||||
message if it doesn't. This test will only fail on Error"""
|
||||
self.check_if_minimum_disk_size_is_set(image)
|
||||
|
||||
@tags('positive', 'integration')
|
||||
@data_driven_test(bfv_datasets.images)
|
||||
def ddtest_min_disk_is_set_for_image(self, image):
|
||||
"""Verify that image has min disk attribute set"""
|
||||
self.assertMinDiskSizeIsSet(image)
|
||||
|
||||
@tags('positive', 'integration')
|
||||
@data_driven_test(bfv_datasets.images_by_volume)
|
||||
def ddtest_create_basic_bootable_volume_from(self, volume_type, image):
|
||||
"""Create a single volume_type volume from image"""
|
||||
self.create_volume_from_image_test(volume_type, image)
|
||||
|
||||
@tags('positive', 'integration')
|
||||
@data_driven_test(bfv_datasets.images_by_flavor)
|
||||
def ddtest_create_bootable_volume_from_a_snapshot_of_a_server(
|
||||
self, image, flavor,
|
||||
|
@ -50,6 +55,7 @@ class BootFromVolumeIntegrationTests(ComputeIntegrationTestFixture):
|
|||
self.create_bootable_volume_from_server_snapshot(
|
||||
image, flavor, volume_type)
|
||||
|
||||
@tags('positive', 'integration')
|
||||
@data_driven_test(bfv_datasets.images_by_flavor)
|
||||
def ddtest_create_bootable_volume_from_last_of_3_snapshots_of_a_server(
|
||||
self, image, flavor,
|
||||
|
@ -57,6 +63,7 @@ class BootFromVolumeIntegrationTests(ComputeIntegrationTestFixture):
|
|||
self.create_bootable_volume_from_third_snapshot_of_server_test(
|
||||
image, flavor, volume_type)
|
||||
|
||||
@tags('positive', 'integration')
|
||||
@data_driven_test(bfv_datasets.flavors_by_images_by_volume_type)
|
||||
def ddtest_boot_a_server_from_a_volume(
|
||||
self, image, flavor, volume_type):
|
||||
|
@ -82,6 +89,7 @@ class BootFromVolumeIntegrationTests(ComputeIntegrationTestFixture):
|
|||
resp = self.server_conn.create_large_file(multiplier=0.1)
|
||||
self.assertTrue(resp, "Unable to write data to bootable OS volume")
|
||||
|
||||
@tags('positive', 'integration')
|
||||
@data_driven_test(bfv_datasets.images_by_flavor)
|
||||
def ddtest_verify_data_on_custom_snapshot_after_copy_to_volume(
|
||||
self, image, flavor,
|
||||
|
|
|
@ -21,6 +21,8 @@ from cloudroast.blockstorage.volumes_api.fixtures import VolumesTestFixture
|
|||
|
||||
class ComputeIntegrationTestFixture(VolumesTestFixture):
|
||||
|
||||
_class_cleanup_tasks = []
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(ComputeIntegrationTestFixture, cls).setUpClass()
|
||||
|
|
|
@ -13,10 +13,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.decorators import (
|
||||
data_driven_test, DataDrivenFixture)
|
||||
from cloudcafe.compute.composites import ComputeAdminComposite
|
||||
|
||||
from cloudroast.blockstorage.volumes_api.integration.compute.fixtures \
|
||||
import ComputeIntegrationTestFixture
|
||||
from cloudroast.blockstorage.volumes_api.integration.compute.datasets \
|
||||
|
@ -26,6 +27,7 @@ from cloudroast.blockstorage.volumes_api.integration.compute.datasets \
|
|||
@DataDrivenFixture
|
||||
class BootFromVolumeLiveMigrateIntegration(ComputeIntegrationTestFixture):
|
||||
|
||||
@tags('positive', 'integration')
|
||||
@data_driven_test(bfv_datasets.flavors_by_images_by_volume_type)
|
||||
def ddtest_live_migrate_bfv_server_with_seven_attached_volumes(
|
||||
self, image, flavor, volume_type):
|
||||
|
|
|
@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
from cafe.drivers.unittest.decorators import tags
|
||||
from qe_coverage.opencafe_decorators import tags, unless_coverage
|
||||
from cafe.drivers.unittest.suite import OpenCafeUnittestTestSuite
|
||||
from cloudroast.blockstorage.volumes_api.integration.compute.fixtures \
|
||||
import ComputeIntegrationTestFixture
|
||||
|
@ -34,6 +34,7 @@ def load_tests(loader, standard_tests, pattern):
|
|||
class VolumeAttachmentsAPISmoke(ComputeIntegrationTestFixture):
|
||||
"""Tests attaching a single volume to a server"""
|
||||
|
||||
@unless_coverage
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(VolumeAttachmentsAPISmoke, cls).setUpClass()
|
||||
|
@ -58,7 +59,11 @@ class VolumeAttachmentsAPISmoke(ComputeIntegrationTestFixture):
|
|||
cls.addClassCleanup(
|
||||
cls.volumes.client.delete_volume, cls.test_volume.id_)
|
||||
|
||||
@tags('integration', 'smoke')
|
||||
@unless_coverage
|
||||
def setUp(self):
|
||||
super(VolumeAttachmentsAPISmoke, self).setUp()
|
||||
|
||||
@tags('integration', 'smoke', 'positive')
|
||||
def test_attach_volume_to_server(self):
|
||||
# Note: For the attach test, I rely on the behavior that waits for
|
||||
# attachment propagation and status changes because in a smoke test,
|
||||
|
@ -71,7 +76,7 @@ class VolumeAttachmentsAPISmoke(ComputeIntegrationTestFixture):
|
|||
self.test_attachment.volume_id, self.test_volume.id_,
|
||||
"Attachment's Volume id and actual Volume id did not match")
|
||||
|
||||
@tags('integration', 'smoke')
|
||||
@tags('integration', 'smoke', 'positive')
|
||||
def test_list_server_volume_attachments(self):
|
||||
resp = self.volume_attachments.client.get_server_volume_attachments(
|
||||
self.test_server.id)
|
||||
|
@ -84,7 +89,7 @@ class VolumeAttachmentsAPISmoke(ComputeIntegrationTestFixture):
|
|||
" volume attachments".format(
|
||||
self.test_attachment.id_, self.test_server.id))
|
||||
|
||||
@tags('integration', 'smoke')
|
||||
@tags('integration', 'smoke', 'positive')
|
||||
def test_get_volume_attachment_details(self):
|
||||
resp = self.volume_attachments.client.get_volume_attachment_details(
|
||||
self.test_attachment.id_, self.test_server.id)
|
||||
|
@ -94,8 +99,17 @@ class VolumeAttachmentsAPISmoke(ComputeIntegrationTestFixture):
|
|||
self.assertDictEqual(
|
||||
vars(self.test_attachment), vars(attachment_details))
|
||||
|
||||
@tags('integration', 'smoke')
|
||||
@tags('integration', 'smoke', 'positive')
|
||||
def test_volume_attachment_delete(self):
|
||||
resp = self.volume_attachments.client.delete_volume_attachment(
|
||||
self.test_attachment.id_, self.test_server.id)
|
||||
self.assertExactResponseStatus(resp, 202)
|
||||
|
||||
@unless_coverage
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
super(VolumeAttachmentsAPISmoke, cls).tearDownClass()
|
||||
|
||||
@unless_coverage
|
||||
def tearDown(self):
|
||||
super(VolumeAttachmentsAPISmoke, self).tearDown()
|
|
@ -13,17 +13,25 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
from qe_coverage.opencafe_decorators import tags, unless_coverage
|
||||
|
||||
from cloudroast.blockstorage.volumes_api.integration.compute.fixtures import \
|
||||
ComputeIntegrationTestFixture
|
||||
|
||||
|
||||
class VolumeCloningIntegrationSmokeTests(ComputeIntegrationTestFixture):
|
||||
|
||||
@unless_coverage
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(VolumeCloningIntegrationSmokeTests, cls).setUpClass()
|
||||
cls.setup_server_and_attached_volume_with_data()
|
||||
|
||||
@unless_coverage
|
||||
def setUp(self):
|
||||
super(VolumeCloningIntegrationSmokeTests, self).setUp()
|
||||
|
||||
@tags('positive', 'integration')
|
||||
def test_source_volume_data_on_volume_clone(self):
|
||||
|
||||
# Unmount and detach the original volume
|
||||
|
@ -63,6 +71,7 @@ class VolumeCloningIntegrationSmokeTests(ComputeIntegrationTestFixture):
|
|||
"not match".format(
|
||||
self.original_hash, md5hash, self.written_filename))
|
||||
|
||||
@unless_coverage
|
||||
def tearDown(self):
|
||||
if hasattr(self, 'clone_attachment'):
|
||||
self.unmount_attached_volume(
|
||||
|
@ -70,3 +79,8 @@ class VolumeCloningIntegrationSmokeTests(ComputeIntegrationTestFixture):
|
|||
self.volume_attachments.behaviors.delete_volume_attachment(
|
||||
self.clone_attachment.id_, self.test_server.id)
|
||||
super(VolumeCloningIntegrationSmokeTests, self).tearDown()
|
||||
|
||||
@unless_coverage
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
super(VolumeCloningIntegrationSmokeTests, cls).tearDownClass()
|
|
@ -13,6 +13,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
from qe_coverage.opencafe_decorators import tags, unless_coverage
|
||||
|
||||
from cafe.drivers.unittest.suite import OpenCafeUnittestTestSuite
|
||||
from cloudroast.blockstorage.volumes_api.integration.compute.fixtures \
|
||||
import ComputeIntegrationTestFixture
|
||||
|
@ -34,6 +36,7 @@ def load_tests(loader, standard_tests, pattern):
|
|||
|
||||
class VolumeIntegrationSmokeTests(ComputeIntegrationTestFixture):
|
||||
|
||||
@unless_coverage
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(VolumeIntegrationSmokeTests, cls).setUpClass()
|
||||
|
@ -52,30 +55,49 @@ class VolumeIntegrationSmokeTests(ComputeIntegrationTestFixture):
|
|||
cls.volume_attachments.behaviors.delete_volume_attachment,
|
||||
cls.test_attachment.id_, cls.test_server.id)
|
||||
|
||||
@unless_coverage
|
||||
def setUp(self):
|
||||
super(VolumeIntegrationSmokeTests, self).setUp()
|
||||
|
||||
@tags('positive', 'integration')
|
||||
def test_format_volume_on_server(self):
|
||||
self.format_attached_volume(
|
||||
self.server_conn, self.test_attachment.os_disk_device_name)
|
||||
|
||||
@tags('positive', 'integration')
|
||||
def test_mount_volume_on_server(self):
|
||||
self.mount_attached_volume(
|
||||
self.server_conn, self.test_attachment.os_disk_device_name,
|
||||
mount_point=self.volume_mount_point)
|
||||
|
||||
@tags('positive', 'integration')
|
||||
def test_verify_volume_writability(self):
|
||||
resp = self.create_remote_file(
|
||||
self.server_conn, self.volume_mount_point, "testfile")
|
||||
assert resp is not None, (
|
||||
"Could not verify writability of attached volume")
|
||||
|
||||
@tags('positive', 'integration')
|
||||
def test_verify_volume_readability(self):
|
||||
md5hash = self.get_remote_file_md5_hash(
|
||||
self.server_conn, self.volume_mount_point, "testfile")
|
||||
assert md5hash is not None, "Unable to hash file on mounted volume"
|
||||
|
||||
@tags('positive', 'integration')
|
||||
def test_unmount_used_volume(self):
|
||||
self.unmount_attached_volume(
|
||||
self.server_conn, self.test_attachment.os_disk_device_name)
|
||||
|
||||
@tags('positive', 'integration')
|
||||
def test_detach_unmounted_volume(self):
|
||||
self.volume_attachments.behaviors.delete_volume_attachment(
|
||||
self.test_attachment.id_, self.test_server.id)
|
||||
|
||||
@unless_coverage
|
||||
def tearDown(self):
|
||||
super(VolumeIntegrationSmokeTests, self).tearDown()
|
||||
|
||||
@unless_coverage
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
super(VolumeIntegrationSmokeTests, cls).tearDownClass()
|
||||
|
|
|
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
"""
|
||||
import time
|
||||
from qe_coverage.opencafe_decorators import tags, unless_coverage
|
||||
|
||||
from cloudroast.blockstorage.volumes_api.integration.compute.fixtures \
|
||||
import ComputeIntegrationTestFixture
|
||||
|
@ -21,6 +22,7 @@ from cloudroast.blockstorage.volumes_api.integration.compute.fixtures \
|
|||
|
||||
class VolumeSnapshotIntegrationSmokeTests(ComputeIntegrationTestFixture):
|
||||
|
||||
@unless_coverage
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(VolumeSnapshotIntegrationSmokeTests, cls).setUpClass()
|
||||
|
@ -35,6 +37,10 @@ class VolumeSnapshotIntegrationSmokeTests(ComputeIntegrationTestFixture):
|
|||
cls.test_attachment = cls.attach_volume_and_get_device_info(
|
||||
cls.server_conn, cls.test_server.id, cls.test_volume.id_)
|
||||
|
||||
@unless_coverage
|
||||
def setUp(self):
|
||||
super(VolumeSnapshotIntegrationSmokeTests, self).setUp()
|
||||
|
||||
@classmethod
|
||||
def attach_volume_and_get_device_info(
|
||||
cls, server_connection, server_id, volume_id):
|
||||
|
@ -90,6 +96,7 @@ class VolumeSnapshotIntegrationSmokeTests(ComputeIntegrationTestFixture):
|
|||
|
||||
return attachment
|
||||
|
||||
@tags('positive', 'integration')
|
||||
def test_restore_snapshot_of_written_volume_and_verify_data(self):
|
||||
|
||||
# Format Volume
|
||||
|
@ -161,3 +168,12 @@ class VolumeSnapshotIntegrationSmokeTests(ComputeIntegrationTestFixture):
|
|||
"Unable to hash file on mounted volume")
|
||||
assert new_md5hash == self.original_md5hash, (
|
||||
"Unable to hash file on mounted volume")
|
||||
|
||||
@unless_coverage
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
super(VolumeSnapshotIntegrationSmokeTests, cls).tearDownClass()
|
||||
|
||||
@unless_coverage
|
||||
def tearDown(self):
|
||||
super(VolumeSnapshotIntegrationSmokeTests, self).tearDown()
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.decorators import (
|
||||
DataDrivenFixture, data_driven_test)
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from cloudcafe.blockstorage.volumes_api.common.models.statuses import \
|
||||
Snapshot as SnapshotStatuses
|
||||
|
||||
from cloudroast.blockstorage.volumes_api.integration.oscli.fixtures \
|
||||
import CinderCLI_IntegrationFixture
|
||||
|
||||
|
@ -11,6 +12,7 @@ from cloudroast.blockstorage.volumes_api.integration.oscli.fixtures \
|
|||
@DataDrivenFixture
|
||||
class CinderCLI_SnapshotSmoke(CinderCLI_IntegrationFixture):
|
||||
|
||||
@tags('positive')
|
||||
@data_driven_test(BlockstorageDatasets.volume_types())
|
||||
def ddtest_snapshot_create_and_delete(
|
||||
self, volume_type_name, volume_type_id):
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.decorators import (
|
||||
DataDrivenFixture, data_driven_test)
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
|
||||
from cloudroast.blockstorage.volumes_api.integration.oscli.fixtures import (
|
||||
CinderCLI_IntegrationFixture)
|
||||
|
||||
|
@ -9,6 +10,7 @@ from cloudroast.blockstorage.volumes_api.integration.oscli.fixtures import (
|
|||
@DataDrivenFixture
|
||||
class CinderCLI_VolumeSmoke(CinderCLI_IntegrationFixture):
|
||||
|
||||
@tags('positive')
|
||||
@data_driven_test(BlockstorageDatasets.volume_types())
|
||||
def ddtest_create_minimum_sized_volume(
|
||||
self, volume_type_name, volume_type_id):
|
||||
|
@ -34,6 +36,7 @@ class CinderCLI_VolumeSmoke(CinderCLI_IntegrationFixture):
|
|||
name, volume.display_name,
|
||||
"Volume display name reported incorrectly")
|
||||
|
||||
@tags('positive')
|
||||
@data_driven_test(BlockstorageDatasets.volume_types())
|
||||
def ddtest_delete_volume_by_id(self, volume_type_name, volume_type_id):
|
||||
# setup
|
||||
|
@ -53,6 +56,7 @@ class CinderCLI_VolumeSmoke(CinderCLI_IntegrationFixture):
|
|||
volume.id_, size, ),
|
||||
"Could not confirm that volume {0} was deleted".format(volume.id_))
|
||||
|
||||
@tags('positive')
|
||||
@data_driven_test(BlockstorageDatasets.volume_types())
|
||||
def ddtest_delete_volume_by_name(self, volume_type_name, volume_type_id):
|
||||
# setup
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
from cafe.drivers.unittest.decorators import \
|
||||
data_driven_test, DataDrivenFixture, tags
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.decorators import \
|
||||
data_driven_test, DataDrivenFixture
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from cloudroast.blockstorage.volumes_api.integration.oscli.fixtures \
|
||||
import NovaCLI_IntegrationFixture
|
||||
|
||||
|
@ -18,6 +19,7 @@ class NovaCLI_IntegrationSmoke(NovaCLI_IntegrationFixture):
|
|||
# Create test server
|
||||
cls.test_server = cls.new_server()
|
||||
|
||||
@tags('positive')
|
||||
@data_driven_test(volume_type_complete_dataset)
|
||||
def ddtest_create_minimum_sized_volume(
|
||||
self, volume_type_name, volume_type_id):
|
||||
|
@ -26,6 +28,7 @@ class NovaCLI_IntegrationSmoke(NovaCLI_IntegrationFixture):
|
|||
volume = self.new_volume(size=size, volume_type=volume_type_id)
|
||||
assert int(volume.size) == int(size), "Volume was the wrong size"
|
||||
|
||||
@tags('positive')
|
||||
@data_driven_test(volume_type_complete_dataset)
|
||||
def ddtest_create_maximum_sized_volume(
|
||||
self, volume_type_name, volume_type_id):
|
||||
|
@ -34,13 +37,13 @@ class NovaCLI_IntegrationSmoke(NovaCLI_IntegrationFixture):
|
|||
volume = self.new_volume(size=size, volume_type=volume_type_id)
|
||||
assert int(volume.size) == int(size), "Volume was the wrong size"
|
||||
|
||||
@tags('nova-integration')
|
||||
@tags('nova-integration', 'positive')
|
||||
@data_driven_test(volume_type_complete_dataset)
|
||||
def ddtest_auto_attach(self, volume_type_name, volume_type_id):
|
||||
volume = self.new_volume(volume_type=volume_type_id)
|
||||
self.verified_volume_attach(self.test_server.id_, volume.id_)
|
||||
|
||||
@tags('nova-integration')
|
||||
@tags('nova-integration', 'positive')
|
||||
@data_driven_test(volume_type_complete_dataset)
|
||||
def ddtest_detach(self, volume_type_name, volume_type_id):
|
||||
# Create volume and attach it to the test server
|
||||
|
@ -54,6 +57,7 @@ class NovaCLI_IntegrationSmoke(NovaCLI_IntegrationFixture):
|
|||
'Unable to detach volume, return code was {0}'.format(
|
||||
resp.return_code))
|
||||
|
||||
@tags('positive')
|
||||
@data_driven_test(volume_type_complete_dataset)
|
||||
def ddtest_delete(self, volume_type_name, volume_type_id):
|
||||
volume = self.new_volume(volume_type=volume_type_id)
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
from cafe.drivers.unittest.decorators import \
|
||||
data_driven_test, DataDrivenFixture, tags
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.decorators import \
|
||||
data_driven_test, DataDrivenFixture
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from cloudroast.blockstorage.volumes_api.integration.oscli.fixtures \
|
||||
import NovaCLI_IntegrationFixture
|
||||
|
||||
|
@ -11,7 +12,7 @@ volume_type_complete_dataset = BlockstorageDatasets.volume_types()
|
|||
@DataDrivenFixture
|
||||
class NovaCLI_VolumesSmoke(NovaCLI_IntegrationFixture):
|
||||
|
||||
@tags('cinder-only')
|
||||
@tags('cinder-only', 'positive')
|
||||
@data_driven_test(volume_type_complete_dataset)
|
||||
def ddtest_create_minimum_sized_volume(
|
||||
self, volume_type_name, volume_type_id):
|
||||
|
@ -21,7 +22,7 @@ class NovaCLI_VolumesSmoke(NovaCLI_IntegrationFixture):
|
|||
volume = self.new_volume(size=size, volume_type=volume_type_id)
|
||||
assert int(volume.size) == int(size), "Volume was the wrong size"
|
||||
|
||||
@tags('cinder-only')
|
||||
@tags('cinder-only', 'positive')
|
||||
@data_driven_test(volume_type_complete_dataset)
|
||||
def ddtest_delete(self, volume_type_name, volume_type_id):
|
||||
|
||||
|
|
|
@ -13,9 +13,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
"""
|
||||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.decorators import \
|
||||
data_driven_test, DataDrivenFixture
|
||||
|
||||
from cloudcafe.blockstorage.volumes_api.common.models import statuses
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from cloudroast.blockstorage.volumes_api.fixtures import \
|
||||
|
@ -32,6 +33,7 @@ complete_volume_types.merge_dataset_tags(default_volume_type)
|
|||
class SnapshotActions(VolumesTestFixture):
|
||||
|
||||
@data_driven_test(complete_volume_types)
|
||||
@tags('smoke', 'positive')
|
||||
def ddtest_verify_snapshot_status_progression(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Verify snapshot passes through all expected states after create"""
|
||||
|
@ -53,6 +55,7 @@ class SnapshotActions(VolumesTestFixture):
|
|||
self.assertEquals(snapshot.size, volume.size)
|
||||
|
||||
@data_driven_test(complete_volume_types)
|
||||
@tags('smoke', 'positive')
|
||||
def ddtest_verify_snapshot_restore_to_same_volume_type(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Verify that a snapshot can be restored to a volume of the
|
||||
|
@ -86,6 +89,7 @@ class SnapshotActions(VolumesTestFixture):
|
|||
attr_list=comparable_attributes_list)
|
||||
|
||||
@data_driven_test(complete_volume_types)
|
||||
@tags('smoke', 'positive')
|
||||
def ddtest_list_snapshots(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Verify that the api can list snapshots"""
|
||||
|
@ -104,6 +108,7 @@ class SnapshotActions(VolumesTestFixture):
|
|||
self.assertIn(snapshot.id_, [s.id_ for s in snapshot_list])
|
||||
|
||||
@data_driven_test(complete_volume_types)
|
||||
@tags('smoke', 'positive')
|
||||
def ddtest_list_detailed_snapshots(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Verify that the api can list snapshot details"""
|
||||
|
@ -122,6 +127,7 @@ class SnapshotActions(VolumesTestFixture):
|
|||
self.assertIn(snapshot.id_, [s.id_ for s in snapshot_list])
|
||||
|
||||
@data_driven_test(complete_volume_types)
|
||||
@tags('smoke', 'positive')
|
||||
def ddtest_get_snapshot_info(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Verify that the api return details on a single snapshot"""
|
||||
|
|
|
@ -14,8 +14,9 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
"""
|
||||
|
||||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.decorators import data_driven_test
|
||||
from cafe.drivers.unittest.decorators import tags
|
||||
from cloudroast.blockstorage.volumes_api.fixtures import \
|
||||
VolumesTestFixture
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
|
@ -28,7 +29,7 @@ volume_types_dataset = BlockstorageDatasets.volume_types()
|
|||
class VolumeActions(VolumesTestFixture):
|
||||
|
||||
@data_driven_test(volume_types_dataset)
|
||||
@tags('volumes', 'smoke')
|
||||
@tags('volumes', 'smoke', 'positive')
|
||||
def ddtest_create_volume(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Verify that a volume of minimum size can be created"""
|
||||
|
@ -77,7 +78,7 @@ class VolumeActions(VolumesTestFixture):
|
|||
self.assertVolumeCreateSucceeded(volume.id_, volume.size)
|
||||
|
||||
@data_driven_test(volume_types_dataset)
|
||||
@tags('volumes', 'smoke')
|
||||
@tags('volumes', 'smoke', 'positive')
|
||||
def ddtest_final_volume_metadata(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Verify that a volume of minimum size can be created"""
|
||||
|
@ -112,7 +113,7 @@ class VolumeActions(VolumesTestFixture):
|
|||
self.assertVolumeCreateSucceeded(volume.id_, volume.size)
|
||||
|
||||
@data_driven_test(volume_types_dataset)
|
||||
@tags('volumes', 'smoke')
|
||||
@tags('volumes', 'smoke', 'positive')
|
||||
def ddtest_update_volume_info_via_body(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Verify that a volume's name and description can be updated after
|
||||
|
@ -162,7 +163,7 @@ class VolumeActions(VolumesTestFixture):
|
|||
"info")
|
||||
|
||||
@data_driven_test(volume_types_dataset)
|
||||
@tags('volumes', 'smoke')
|
||||
@tags('volumes', 'smoke', 'positive')
|
||||
def ddtest_get_volume_info(self, volume_type_name, volume_type_id):
|
||||
"""Verify that the API can return detailed information on a single
|
||||
volume
|
||||
|
@ -180,7 +181,7 @@ class VolumeActions(VolumesTestFixture):
|
|||
self.assertVolumeAttributesAreEqual(volume, volume_info)
|
||||
|
||||
@data_driven_test(volume_types_dataset)
|
||||
@tags('volumes', 'smoke')
|
||||
@tags('volumes', 'smoke', 'positive')
|
||||
def ddtest_list_volumes(self, volume_type_name, volume_type_id):
|
||||
"""Verify that the API can return a list of all volumes"""
|
||||
|
||||
|
@ -201,7 +202,7 @@ class VolumeActions(VolumesTestFixture):
|
|||
'{0}'.format(volume.id_))
|
||||
|
||||
@data_driven_test(volume_types_dataset)
|
||||
@tags('volumes', 'smoke')
|
||||
@tags('volumes', 'smoke', 'positive')
|
||||
def ddtest_list_volume_details(self, volume_type_name, volume_type_id):
|
||||
"""Verify that the API can return a list detailed information for
|
||||
all volumes
|
||||
|
@ -227,7 +228,7 @@ class VolumeActions(VolumesTestFixture):
|
|||
volume, volume_info, excluded_attrs_list=['volume_image_metadata'])
|
||||
|
||||
@data_driven_test(volume_types_dataset)
|
||||
@tags('volumes', 'smoke')
|
||||
@tags('volumes', 'smoke', 'positive')
|
||||
def ddtest_delete_volume(self, volume_type_name, volume_type_id):
|
||||
"""Verify that a volume can be deleted"""
|
||||
|
||||
|
|
|
@ -14,12 +14,14 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
"""
|
||||
|
||||
from cafe.drivers.unittest.decorators import data_driven_test
|
||||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.decorators import (
|
||||
data_driven_test, DataDrivenFixture)
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from cloudcafe.blockstorage.volumes_api.common.models import statuses
|
||||
from cloudroast.blockstorage.volumes_api.fixtures import \
|
||||
VolumesTestFixture
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from cafe.drivers.unittest.decorators import DataDrivenFixture
|
||||
|
||||
|
||||
volume_types_dataset = BlockstorageDatasets.volume_types()
|
||||
|
@ -29,6 +31,7 @@ volume_types_dataset = BlockstorageDatasets.volume_types()
|
|||
class VolumeCapacity(VolumesTestFixture):
|
||||
|
||||
@data_driven_test(volume_types_dataset)
|
||||
@tags('smoke', 'positive')
|
||||
def ddtest_create_maximum_size_volume(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Verify that a volume of maximum size can be created"""
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
from cafe.drivers.unittest.decorators import data_driven_test
|
||||
from cafe.drivers.unittest.decorators import tags
|
||||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.decorators import (
|
||||
data_driven_test, DataDrivenFixture)
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from cloudroast.blockstorage.volumes_api.fixtures import \
|
||||
VolumesTestFixture
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from cafe.drivers.unittest.decorators import DataDrivenFixture
|
||||
|
||||
volume_types_dataset = BlockstorageDatasets.volume_types()
|
||||
volume_types_dataset.apply_test_tags('volume-cloning-complete-dataset')
|
||||
|
@ -20,7 +21,7 @@ volume_types_dataset.merge_dataset_tags(random_vtype_dataset)
|
|||
class CBSVolumeCloneTests(VolumesTestFixture):
|
||||
|
||||
@data_driven_test(volume_types_dataset)
|
||||
@tags('smoke')
|
||||
@tags('smoke', 'positive')
|
||||
def ddtest_create_exact_clone_of_existing_volume_and_verify_attributes(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Verify that data written to a volume is intact and available
|
||||
|
@ -80,6 +81,7 @@ class CBSVolumeCloneTests(VolumesTestFixture):
|
|||
# volume, volume_clone_info, key_list=key_list)
|
||||
|
||||
@data_driven_test(volume_types_dataset)
|
||||
@tags('smoke', 'positive')
|
||||
def ddtest_create_larger_clone_of_volume(
|
||||
self, volume_type_name, volume_type_id):
|
||||
"""Clone a volume using a larger size than the original volume."""
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
from cafe.drivers.unittest.decorators import \
|
||||
tags, data_driven_test, DataDrivenFixture
|
||||
from qe_coverage.opencafe_decorators import tags
|
||||
|
||||
from cafe.drivers.unittest.datasets import DatasetList
|
||||
from cafe.drivers.unittest.decorators import \
|
||||
data_driven_test, DataDrivenFixture
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
from cloudroast.blockstorage.volumes_api.fixtures import \
|
||||
VolumesTestFixture
|
||||
from cloudcafe.blockstorage.datasets import BlockstorageDatasets
|
||||
|
||||
|
||||
class QuotaTestDatasets(BlockstorageDatasets):
|
||||
|
@ -34,6 +36,7 @@ class QuotaTestDatasets(BlockstorageDatasets):
|
|||
@DataDrivenFixture
|
||||
class QuotaTest(VolumesTestFixture):
|
||||
|
||||
@tags('smoke', 'negative')
|
||||
def test_negative_show_default_quota_with_garbage_tenant_id(self):
|
||||
"""Negative test requesting default quotas with an invalid tenant id"""
|
||||
|
||||
|
@ -43,6 +46,7 @@ class QuotaTest(VolumesTestFixture):
|
|||
"test_show_default_quota_with_garbage_tenant_id"
|
||||
" passed while using a garbage target tenant_id")
|
||||
|
||||
@tags('smoke', 'positive')
|
||||
def test_show_default_quota(self):
|
||||
"""Test requesting default quotas with a valid id"""
|
||||
|
||||
|
@ -51,6 +55,7 @@ class QuotaTest(VolumesTestFixture):
|
|||
self.assertExactResponseStatus(
|
||||
resp, 200, msg="Unexpected response status")
|
||||
|
||||
@tags('smoke', 'positive')
|
||||
@data_driven_test(QuotaTestDatasets.valid_quota_names())
|
||||
def ddtest_verify_quota(self, quota_name):
|
||||
"""Test to verify resource key names obtained from response with
|
||||
|
|
Loading…
Reference in New Issue