test update volume type extra specs for non existent volume type

Update volume type extra specs for non existent volume type
should fail
Change-Id: Ib36b517cab1b13d2ed4ae5bae0123bea54e4d27d
This commit is contained in:
wangzhiguang 2021-08-30 15:12:56 +08:00
parent 663787ee79
commit 92d48d9482
1 changed files with 15 additions and 0 deletions

View File

@ -76,6 +76,21 @@ class ExtraSpecsNegativeTest(base.BaseVolumeAdminTest):
self.volume_type['id'], list(extra_spec)[0],
extra_spec)
@decorators.attr(type=['negative'])
@decorators.idempotent_id('474090d2-0824-eb3b-9335-f506b4aa49d8')
def test_update_nonexistent_type_id(self):
"""Test update volume type extra specs for non existent volume type
Update volume type extra specs for non existent volume type should
fail.
"""
spec_key = "spec1"
extra_spec = {spec_key: "val5"}
self.assertRaises(
lib_exc.NotFound,
self.admin_volume_types_client.update_volume_type_extra_specs,
data_utils.rand_uuid(), spec_key, extra_spec)
@decorators.attr(type=['negative'])
@decorators.idempotent_id('49d5472c-a53d-4eab-a4d3-450c4db1c545')
def test_create_nonexistent_type_id(self):