From 0672955e15fd802a5d1f08481dd58408e1f3ec8c Mon Sep 17 00:00:00 2001 From: zhufl Date: Wed, 3 Jun 2020 16:41:03 +0800 Subject: [PATCH] Fix negative tests of update_volume for volume microversion 3.59 In volume microversion 3.59, empty body of update_volume will cause BadRequest error, tempest.lib.exceptions.BadRequest: Bad request Details: {'code': 400, 'message': 'Invalid input for field/attribute volume. Value: {}. {} is not valid under any of the given schemas'}, so this is to add update_volume body for the negative tests of updating volume with invalid volume id. Change-Id: I7ef3ce911960c12c3045e1aa136f2ae3ead6d715 Closes-Bug: #1881866 --- tempest/api/volume/test_volumes_negative.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py index 866bd87c14..f6d24438b2 100644 --- a/tempest/api/volume/test_volumes_negative.py +++ b/tempest/api/volume/test_volumes_negative.py @@ -126,13 +126,13 @@ class VolumesNegativeTest(base.BaseVolumeTest): @decorators.idempotent_id('0186422c-999a-480e-a026-6a665744c30c') def test_update_volume_with_nonexistent_volume_id(self): self.assertRaises(lib_exc.NotFound, self.volumes_client.update_volume, - volume_id=data_utils.rand_uuid()) + volume_id=data_utils.rand_uuid(), name="n") @decorators.attr(type=['negative']) @decorators.idempotent_id('e66e40d6-65e6-4e75-bdc7-636792fa152d') def test_update_volume_with_invalid_volume_id(self): self.assertRaises(lib_exc.NotFound, self.volumes_client.update_volume, - volume_id=data_utils.rand_name('invalid')) + volume_id=data_utils.rand_name('invalid'), name="n") @decorators.attr(type=['negative']) @decorators.idempotent_id('72aeca85-57a5-4c1f-9057-f320f9ea575b')