create ARQ with non-exist device profile

add create ARQ with non-exist device profile testcase

Change-Id: I54bfdb1cf277460b23bc937af16541f5630e8110
This commit is contained in:
wangzhiguang 2022-07-04 10:52:17 +08:00
parent 29c6869b1d
commit 7274bd084d

View File

@ -53,3 +53,12 @@ class AcceleratorRequestNegativeTest(base.BaseAPITest):
lib_exc.NotFound,
self.os_admin.cyborg_client.create_accelerator_request,
dp_mame)
@test.attr(type=['negative', 'gate'])
def test_create_accelerator_request_device_profile_name_non_exist(self):
# create the accelerator request with device profile name non_exist
dp_mame = {"device_profile_name": "fake_dp"}
self.assertRaises(
lib_exc.NotFound,
self.os_admin.cyborg_client.create_accelerator_request,
dp_mame)