Remove the device_profile test case
In [1], we modified the cyborg device_profile API, changed it's response body, it was broken the API without microversion added, so we should revert this change, and need to remove this test case. [1] https://review.opendev.org/c/openstack/cyborg/+/751988 Co-Authored-By: Brin Zhang <zhangbailin@inspur.com> Change-Id: I33a6a205ed878f93398891e84c2086169b72835f
This commit is contained in:
parent
273a2e998d
commit
68c4862b48
@ -36,37 +36,41 @@ class TestDeviceProfileController(base.BaseAPITest):
|
|||||||
self.os_admin.cyborg_client.delete_multiple_device_profile_by_names(
|
self.os_admin.cyborg_client.delete_multiple_device_profile_by_names(
|
||||||
dp_one[0]['name'], dp_two[0]['name'])
|
dp_one[0]['name'], dp_two[0]['name'])
|
||||||
|
|
||||||
def test_get_and_delete_device_profile(self):
|
# TODO(brinzhang): After backport
|
||||||
# Removing the residual resources if it exists in the env
|
# https://review.opendev.org/c/openstack/cyborg/+/784521, we will modify
|
||||||
list_resp = self.os_admin.cyborg_client.list_device_profile()
|
# this test case.
|
||||||
if len(list_resp['device_profiles']) >= 1:
|
|
||||||
self.os_admin.cyborg_client.delete_device_profile_by_uuid(
|
|
||||||
list_resp['device_profiles'][0]['uuid'])
|
|
||||||
|
|
||||||
dp = cyborg_data.NORMAL_DEVICE_PROFILE_DATA1
|
# def test_get_and_delete_device_profile(self):
|
||||||
create_resp = self.os_admin.cyborg_client.create_device_profile(dp)
|
# # Removing the residual resources if it exists in the env
|
||||||
device_profile_uuid = create_resp['uuid']
|
# list_resp = self.os_admin.cyborg_client.list_device_profile()
|
||||||
self.assertEqual(dp[0]['name'], create_resp['name'])
|
# if len(list_resp['device_profiles']) >= 1:
|
||||||
self.assertEqual(dp[0]['groups'], create_resp['groups'])
|
# self.os_admin.cyborg_client.delete_device_profile_by_uuid(
|
||||||
|
# list_resp['device_profiles'][0]['uuid'])
|
||||||
|
|
||||||
list_resp = self.os_admin.cyborg_client.list_device_profile()
|
# dp = cyborg_data.NORMAL_DEVICE_PROFILE_DATA1
|
||||||
device_profile_list = list_resp['device_profiles']
|
# create_resp = self.os_admin.cyborg_client.create_device_profile(dp)
|
||||||
device_profile_uuid_list = [it['uuid'] for it in device_profile_list]
|
# device_profile_uuid = create_resp['uuid']
|
||||||
self.assertIn(device_profile_uuid, device_profile_uuid_list)
|
# self.assertEqual(dp[0]['name'], create_resp['name'])
|
||||||
|
# self.assertEqual(dp[0]['groups'], create_resp['groups'])
|
||||||
|
|
||||||
get_resp = self.os_admin.cyborg_client.get_device_profile(
|
# list_resp = self.os_admin.cyborg_client.list_device_profile()
|
||||||
device_profile_uuid)
|
# device_profile_list = list_resp['device_profiles']
|
||||||
self.assertEqual(dp[0]['name'], get_resp['name'])
|
# device_profile_uuid_list = [it['uuid'] for it in device_profile_list]
|
||||||
self.assertEqual(
|
# self.assertIn(device_profile_uuid, device_profile_uuid_list)
|
||||||
device_profile_uuid,
|
|
||||||
get_resp['uuid'])
|
|
||||||
|
|
||||||
self.os_admin.cyborg_client.delete_device_profile_by_uuid(
|
# get_resp = self.os_admin.cyborg_client.get_device_profile(
|
||||||
device_profile_uuid)
|
# device_profile_uuid)
|
||||||
list_resp = self.os_admin.cyborg_client.list_device_profile()
|
# self.assertEqual(dp[0]['name'], get_resp['name'])
|
||||||
device_profile_list = list_resp['device_profiles']
|
# self.assertEqual(
|
||||||
device_profile_uuid_list = [it['uuid'] for it in device_profile_list]
|
# device_profile_uuid,
|
||||||
self.assertNotIn(device_profile_uuid, device_profile_uuid_list)
|
# get_resp['uuid'])
|
||||||
|
|
||||||
|
# self.os_admin.cyborg_client.delete_device_profile_by_uuid(
|
||||||
|
# device_profile_uuid)
|
||||||
|
# list_resp = self.os_admin.cyborg_client.list_device_profile()
|
||||||
|
# device_profile_list = list_resp['device_profiles']
|
||||||
|
# device_profile_uuid_list = [it['uuid'] for it in device_profile_list]
|
||||||
|
# self.assertNotIn(device_profile_uuid, device_profile_uuid_list)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def resource_cleanup(cls):
|
def resource_cleanup(cls):
|
||||||
|
Loading…
Reference in New Issue
Block a user