From c04109a59bcb0a90aeb5f80fc0eb137d78b6b3f7 Mon Sep 17 00:00:00 2001 From: Luke Wollney Date: Wed, 16 Mar 2016 11:54:38 -0500 Subject: [PATCH] Update deactivate_reactivate_block_storage_test *Updated validation when attempting to create a volume from a deactivated snapshot. The request should now return a 400 response instead of accepting the request to create a volume from a deactivated snapshot and the volume creation eventually fail. *Updated the test docstring *Updated the copyright date Change-Id: I92e3f20401f56498b8b585d475df66be4515adb1 --- .../deactivate_reactivate_block_storage_test.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/cloudroast/glance/integration/blockstorage/deactivate_reactivate_block_storage_test.py b/cloudroast/glance/integration/blockstorage/deactivate_reactivate_block_storage_test.py index 9b1ea184..29a06faf 100644 --- a/cloudroast/glance/integration/blockstorage/deactivate_reactivate_block_storage_test.py +++ b/cloudroast/glance/integration/blockstorage/deactivate_reactivate_block_storage_test.py @@ -1,5 +1,5 @@ """ -Copyright 2015 Rackspace +Copyright 2016 Rackspace Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -58,8 +58,7 @@ class DeactivateReactivateBlockStorage(ImagesIntegrationFixture): This test will be successful if: - The response code received for deactivate image is a 204 - - The response received for create volume is valid - - The volume status is error + - The response code received for create volume is a 400 """ # Deactivate Image @@ -70,13 +69,7 @@ class DeactivateReactivateBlockStorage(ImagesIntegrationFixture): size=self.volumes.config.min_volume_from_image_size, volume_type=self.volumes.config.default_volume_type, image_ref=self.image.id) - self.assertResponseDeserializedAndOk(resp) - created_volume = resp.entity - self.resources.add( - created_volume.id_, self.volumes.client.delete_volume) - # Verify volume status is error - self.assertImageToVolumeCopyErrored( - created_volume.id_, self.volumes.config.min_volume_from_image_size) + self.assertEqual(400, resp.status_code) def test_create_volume_from_reactivated_image(self): """