From 7274bd084d48b901db840b1314c17c36b6ba2b8b Mon Sep 17 00:00:00 2001 From: wangzhiguang Date: Mon, 4 Jul 2022 10:52:17 +0800 Subject: [PATCH] create ARQ with non-exist device profile add create ARQ with non-exist device profile testcase Change-Id: I54bfdb1cf277460b23bc937af16541f5630e8110 --- .../tests/api/test_accelerator_request_negative.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cyborg_tempest_plugin/tests/api/test_accelerator_request_negative.py b/cyborg_tempest_plugin/tests/api/test_accelerator_request_negative.py index 2eec7b6..d1e6577 100644 --- a/cyborg_tempest_plugin/tests/api/test_accelerator_request_negative.py +++ b/cyborg_tempest_plugin/tests/api/test_accelerator_request_negative.py @@ -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)