Remove long-ago deprecated show_categories
The API catalog endpoint `show_categories` was deprecated back in Liberty cycle. It should be removed. This commit removes the deprecated endpoint `show_categories`, removes it from the API router, and removes references to it in Tempest tests -- which now test `list_categories` instead. Change-Id: If1bea7448c0d4aa5fdf37c8400323589d73fdb21
This commit is contained in:
parent
410422d7c4
commit
e2c430470b
|
@ -270,7 +270,7 @@ class ApplicationCatalogClient(rest_client.RestClient):
|
|||
|
||||
# -----------------------------Category methods--------------------------------
|
||||
def list_categories(self):
|
||||
uri = 'v1/catalog/packages/categories'
|
||||
uri = 'v1/catalog/categories'
|
||||
resp, body = self.get(uri)
|
||||
self.expected_success(200, resp.status)
|
||||
return self._parse_resp(body)
|
||||
|
|
|
@ -41,7 +41,7 @@ class TestCategories(base.BaseApplicationCatalogIsolatedAdminTest):
|
|||
super(TestCategories, cls).resource_cleanup()
|
||||
|
||||
@testtools.testcase.attr('smoke')
|
||||
def test_get_list_categories(self):
|
||||
def test_list_categories(self):
|
||||
categories_list = self.application_catalog_client.list_categories()
|
||||
self.assertIsInstance(categories_list, list)
|
||||
|
||||
|
@ -49,14 +49,20 @@ class TestCategories(base.BaseApplicationCatalogIsolatedAdminTest):
|
|||
def test_create_and_delete_category(self):
|
||||
name = utils.generate_name('create_and_delete_category')
|
||||
categories_list = self.application_catalog_client.list_categories()
|
||||
self.assertNotIn(name, categories_list)
|
||||
category_names = [c['name'] for c in categories_list]
|
||||
self.assertNotIn(name, category_names)
|
||||
|
||||
category = self.application_catalog_client.create_category(name)
|
||||
self.assertEqual(name, category['name'])
|
||||
|
||||
categories_list = self.application_catalog_client.list_categories()
|
||||
self.assertIn(name, categories_list)
|
||||
category_names = [c['name'] for c in categories_list]
|
||||
self.assertIn(name, category_names)
|
||||
|
||||
self.application_catalog_client.delete_category(category['id'])
|
||||
categories_list = self.application_catalog_client.list_categories()
|
||||
self.assertNotIn(name, categories_list)
|
||||
category_names = [c['name'] for c in categories_list]
|
||||
self.assertNotIn(name, category_names)
|
||||
|
||||
def test_get_category(self):
|
||||
category = self.application_catalog_client.get_category(
|
||||
|
|
Loading…
Reference in New Issue