Add register image smoke test
*Added register image smoke test to image operations smoke test suite *Updated register image smoke test to pass in an image name during registration for tracking and teardown purposes *Updated register image smoke test to add the resource for deletion *Removed the register image smoke test from the skippable smoke Change-Id: Ic30b325c5aca30c18421b80af9b3bbc7a01cdb65
This commit is contained in:
parent
5621cc9e63
commit
a08b76893d
@ -53,6 +53,24 @@ class ImageOperationsSmoke(ImagesFixture):
|
||||
cls.images.behaviors.resources.release()
|
||||
super(ImageOperationsSmoke, cls).tearDownClass()
|
||||
|
||||
def test_register_image(self):
|
||||
"""
|
||||
@summary: Register an image
|
||||
|
||||
1) Register an image
|
||||
2) Verify that the response code is 201
|
||||
3) Add the image to the resource pool for deletion
|
||||
"""
|
||||
|
||||
resp = self.images.client.register_image(
|
||||
name=rand_name('image_operations_smoke'))
|
||||
self.assertEqual(
|
||||
resp.status_code, 201,
|
||||
Messages.STATUS_CODE_MSG.format(201, resp.status_code))
|
||||
image = resp.entity
|
||||
|
||||
self.resources.add(image.id_, self.images.client.delete_image)
|
||||
|
||||
@data_driven_test(ImagesDatasetListGenerator.ListImagesSmoke())
|
||||
def ddtest_list_images(self, params):
|
||||
"""
|
||||
|
@ -46,24 +46,6 @@ class RegisteredImageOperationsSmoke(ImagesFixture):
|
||||
cls.images.client.store_image_file(
|
||||
cls.alt_registered_image.id_, cls.file_data)
|
||||
|
||||
def test_register_image(self):
|
||||
"""
|
||||
@summary: Register an image
|
||||
|
||||
1) Register an image
|
||||
2) Verify that the response code is 201
|
||||
3) Add the image to the resource pool for deletion
|
||||
"""
|
||||
|
||||
resp = self.images.client.register_image(
|
||||
name=rand_name('registered_image_operations_smoke'))
|
||||
self.assertEqual(
|
||||
resp.status_code, 201,
|
||||
Messages.STATUS_CODE_MSG.format(201, resp.status_code))
|
||||
image = resp.entity
|
||||
|
||||
self.resources.add(image.id_, self.images.client.delete_image)
|
||||
|
||||
@unittest.skipUnless(images_config.allow_put_image_file,
|
||||
'Functionality disabled with provided endpoint')
|
||||
def test_store_image_file(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user