Set smoke/gate attributes for tests in "image"
Change-Id: I4bae858dfc5fba2c45e869a58e89fe7c14c3b30b
Implements: blueprint set-gate-attribute
diff --git a/tempest/tests/image/v1/test_image_members.py b/tempest/tests/image/v1/test_image_members.py
index 92052fc..7293d59 100644
--- a/tempest/tests/image/v1/test_image_members.py
+++ b/tempest/tests/image/v1/test_image_members.py
@@ -17,6 +17,7 @@
import cStringIO as StringIO
from tempest import clients
+from tempest.test import attr
from tempest.tests.image import base
@@ -45,6 +46,7 @@
image_id = image['id']
return image_id
+ @attr(type='gate')
def test_add_image_member(self):
image = self._create_image()
resp = self.client.add_member(self.tenants[0], image)
@@ -55,6 +57,7 @@
members = map(lambda x: x['member_id'], members)
self.assertIn(self.tenants[0], members)
+ @attr(type='gate')
def test_get_shared_images(self):
image = self._create_image()
resp = self.client.add_member(self.tenants[0], image)
@@ -69,6 +72,7 @@
self.assertIn(share_image, images)
self.assertIn(image, images)
+ @attr(type='gate')
def test_remove_member(self):
image_id = self._create_image()
resp = self.client.add_member(self.tenants[0], image_id)
diff --git a/tempest/tests/image/v1/test_images.py b/tempest/tests/image/v1/test_images.py
index 19c0aa0..70e5762 100644
--- a/tempest/tests/image/v1/test_images.py
+++ b/tempest/tests/image/v1/test_images.py
@@ -25,18 +25,18 @@
class CreateRegisterImagesTest(base.BaseV1ImageTest):
"""Here we test the registration and creation of images."""
- @attr(type='negative')
+ @attr(type='gate')
def test_register_with_invalid_container_format(self):
# Negative tests for invalid data supplied to POST /images
self.assertRaises(exceptions.BadRequest, self.client.create_image,
'test', 'wrong', 'vhd')
- @attr(type='negative')
+ @attr(type='gate')
def test_register_with_invalid_disk_format(self):
self.assertRaises(exceptions.BadRequest, self.client.create_image,
'test', 'bare', 'wrong')
- @attr(type='image')
+ @attr(type='gate')
def test_register_then_upload(self):
# Register, then upload an image
properties = {'prop1': 'val1'}
@@ -60,7 +60,7 @@
self.assertTrue('size' in body)
self.assertEqual(1024, body.get('size'))
- @attr(type='image')
+ @attr(type='gate')
def test_register_remote_image(self):
# Register a new remote image
resp, body = self.create_image(name='New Remote Image',
@@ -80,6 +80,7 @@
self.assertEqual(properties['key1'], 'value1')
self.assertEqual(properties['key2'], 'value2')
+ @attr(type='gate')
def test_register_http_image(self):
resp, body = self.create_image(name='New Http Image',
container_format='bare',
@@ -94,7 +95,7 @@
resp, body = self.client.get_image(image_id)
self.assertEqual(resp['status'], '200')
- @attr(type='image')
+ @attr(type='gate')
def test_register_image_with_min_ram(self):
# Register an image with min ram
properties = {'prop1': 'val1'}
@@ -182,7 +183,7 @@
image_id = image['id']
return image_id
- @attr(type='image')
+ @attr(type='gate')
def test_index_no_params(self):
# Simple test to see all fixture images returned
resp, images_list = self.client.image_list()
@@ -191,7 +192,7 @@
for image_id in self.created_images:
self.assertTrue(image_id in image_list)
- @attr(type='image')
+ @attr(type='gate')
def test_index_disk_format(self):
resp, images_list = self.client.image_list(disk_format='ami')
self.assertEqual(resp['status'], '200')
@@ -201,7 +202,7 @@
self.assertTrue(self.ami_set <= result_set)
self.assertFalse(self.created_set - self.ami_set <= result_set)
- @attr(type='image')
+ @attr(type='gate')
def test_index_container_format(self):
resp, images_list = self.client.image_list(container_format='bare')
self.assertEqual(resp['status'], '200')
@@ -211,7 +212,7 @@
self.assertTrue(self.bare_set <= result_set)
self.assertFalse(self.created_set - self.bare_set <= result_set)
- @attr(type='image')
+ @attr(type='gate')
def test_index_max_size(self):
resp, images_list = self.client.image_list(size_max=42)
self.assertEqual(resp['status'], '200')
@@ -221,7 +222,7 @@
self.assertTrue(self.size42_set <= result_set)
self.assertFalse(self.created_set - self.size42_set <= result_set)
- @attr(type='image')
+ @attr(type='gate')
def test_index_min_size(self):
resp, images_list = self.client.image_list(size_min=142)
self.assertEqual(resp['status'], '200')
@@ -231,7 +232,7 @@
self.assertTrue(self.size142_set <= result_set)
self.assertFalse(self.size42_set <= result_set)
- @attr(type='image')
+ @attr(type='gate')
def test_index_status_active_detail(self):
resp, images_list = self.client.image_list_detail(status='active',
sort_key='size',
@@ -244,7 +245,7 @@
top_size = size
self.assertEqual(image['status'], 'active')
- @attr(type='image')
+ @attr(type='gate')
def test_index_name(self):
resp, images_list = self.client.image_list_detail(
name='New Remote Image dup')
diff --git a/tempest/tests/image/v2/test_images.py b/tempest/tests/image/v2/test_images.py
index 15db519..6356b4c 100644
--- a/tempest/tests/image/v2/test_images.py
+++ b/tempest/tests/image/v2/test_images.py
@@ -30,18 +30,18 @@
Here we test the registration and creation of images
"""
- @attr(type='negative')
+ @attr(type='gate')
def test_register_with_invalid_container_format(self):
# Negative tests for invalid data supplied to POST /images
self.assertRaises(exceptions.BadRequest, self.client.create_image,
'test', 'wrong', 'vhd')
- @attr(type='negative')
+ @attr(type='gate')
def test_register_with_invalid_disk_format(self):
self.assertRaises(exceptions.BadRequest, self.client.create_image,
'test', 'bare', 'wrong')
- @attr(type='image')
+ @attr(type='gate')
def test_register_then_upload(self):
# Register, then upload an image
resp, body = self.create_image(name='New Name',
@@ -98,7 +98,7 @@
return image_id
- @attr(type='image')
+ @attr(type='gate')
def test_index_no_params(self):
# Simple test to see all fixture images returned
resp, images_list = self.client.image_list()