Ensure the endpoint filter API supports HEAD
This commit makes it so all GET APIs within the endpoint filter API support HEAD as well. Change-Id: I6dd8b3f7494003bca110623a3b8133c81ff90877 Partial-Bug: 1696574
This commit is contained in:
parent
c528539879
commit
5f4c2f5b8d
|
@ -99,7 +99,7 @@ class Routers(wsgi.RoutersBase):
|
||||||
self._add_resource(
|
self._add_resource(
|
||||||
mapper, endpoint_filter_controller,
|
mapper, endpoint_filter_controller,
|
||||||
path=self.PATH_PREFIX + '/endpoints/{endpoint_id}/projects',
|
path=self.PATH_PREFIX + '/endpoints/{endpoint_id}/projects',
|
||||||
get_action='list_projects_for_endpoint',
|
get_head_action='list_projects_for_endpoint',
|
||||||
rel=build_resource_relation(resource_name='endpoint_projects'),
|
rel=build_resource_relation(resource_name='endpoint_projects'),
|
||||||
path_vars={
|
path_vars={
|
||||||
'endpoint_id': json_home.Parameters.ENDPOINT_ID,
|
'endpoint_id': json_home.Parameters.ENDPOINT_ID,
|
||||||
|
@ -118,7 +118,7 @@ class Routers(wsgi.RoutersBase):
|
||||||
self._add_resource(
|
self._add_resource(
|
||||||
mapper, endpoint_filter_controller,
|
mapper, endpoint_filter_controller,
|
||||||
path=self.PATH_PREFIX + '/projects/{project_id}/endpoints',
|
path=self.PATH_PREFIX + '/projects/{project_id}/endpoints',
|
||||||
get_action='list_endpoints_for_project',
|
get_head_action='list_endpoints_for_project',
|
||||||
rel=build_resource_relation(resource_name='project_endpoints'),
|
rel=build_resource_relation(resource_name='project_endpoints'),
|
||||||
path_vars={
|
path_vars={
|
||||||
'project_id': json_home.Parameters.PROJECT_ID,
|
'project_id': json_home.Parameters.PROJECT_ID,
|
||||||
|
@ -126,7 +126,7 @@ class Routers(wsgi.RoutersBase):
|
||||||
self._add_resource(
|
self._add_resource(
|
||||||
mapper, endpoint_group_controller,
|
mapper, endpoint_group_controller,
|
||||||
path=self.PATH_PREFIX + '/projects/{project_id}/endpoint_groups',
|
path=self.PATH_PREFIX + '/projects/{project_id}/endpoint_groups',
|
||||||
get_action='list_endpoint_groups_for_project',
|
get_head_action='list_endpoint_groups_for_project',
|
||||||
rel=build_resource_relation(
|
rel=build_resource_relation(
|
||||||
resource_name='project_endpoint_groups'),
|
resource_name='project_endpoint_groups'),
|
||||||
path_vars={
|
path_vars={
|
||||||
|
@ -135,7 +135,7 @@ class Routers(wsgi.RoutersBase):
|
||||||
self._add_resource(
|
self._add_resource(
|
||||||
mapper, endpoint_group_controller,
|
mapper, endpoint_group_controller,
|
||||||
path=self.PATH_PREFIX + '/endpoint_groups',
|
path=self.PATH_PREFIX + '/endpoint_groups',
|
||||||
get_action='list_endpoint_groups',
|
get_head_action='list_endpoint_groups',
|
||||||
post_action='create_endpoint_group',
|
post_action='create_endpoint_group',
|
||||||
rel=build_resource_relation(resource_name='endpoint_groups'))
|
rel=build_resource_relation(resource_name='endpoint_groups'))
|
||||||
self._add_resource(
|
self._add_resource(
|
||||||
|
@ -164,7 +164,7 @@ class Routers(wsgi.RoutersBase):
|
||||||
mapper, endpoint_group_controller,
|
mapper, endpoint_group_controller,
|
||||||
path=self.PATH_PREFIX + self.PATH_ENDPOINT_GROUPS + (
|
path=self.PATH_PREFIX + self.PATH_ENDPOINT_GROUPS + (
|
||||||
'/projects'),
|
'/projects'),
|
||||||
get_action='list_projects_associated_with_endpoint_group',
|
get_head_action='list_projects_associated_with_endpoint_group',
|
||||||
rel=build_resource_relation(
|
rel=build_resource_relation(
|
||||||
resource_name='projects_associated_with_endpoint_group'),
|
resource_name='projects_associated_with_endpoint_group'),
|
||||||
path_vars={
|
path_vars={
|
||||||
|
@ -174,7 +174,7 @@ class Routers(wsgi.RoutersBase):
|
||||||
mapper, endpoint_group_controller,
|
mapper, endpoint_group_controller,
|
||||||
path=self.PATH_PREFIX + self.PATH_ENDPOINT_GROUPS + (
|
path=self.PATH_PREFIX + self.PATH_ENDPOINT_GROUPS + (
|
||||||
'/endpoints'),
|
'/endpoints'),
|
||||||
get_action='list_endpoints_associated_with_endpoint_group',
|
get_head_action='list_endpoints_associated_with_endpoint_group',
|
||||||
rel=build_resource_relation(
|
rel=build_resource_relation(
|
||||||
resource_name='endpoints_in_endpoint_group'),
|
resource_name='endpoints_in_endpoint_group'),
|
||||||
path_vars={
|
path_vars={
|
||||||
|
|
|
@ -86,7 +86,8 @@ class EndpointFilterCRUDTestCase(EndpointFilterTestCase):
|
||||||
self.head('/OS-EP-FILTER/projects/%(project_id)s'
|
self.head('/OS-EP-FILTER/projects/%(project_id)s'
|
||||||
'/endpoints/%(endpoint_id)s' % {
|
'/endpoints/%(endpoint_id)s' % {
|
||||||
'project_id': self.default_domain_project_id,
|
'project_id': self.default_domain_project_id,
|
||||||
'endpoint_id': self.endpoint_id})
|
'endpoint_id': self.endpoint_id},
|
||||||
|
expected_status=http_client.NO_CONTENT)
|
||||||
|
|
||||||
def test_check_endpoint_project_association_with_invalid_project(self):
|
def test_check_endpoint_project_association_with_invalid_project(self):
|
||||||
"""HEAD /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}.
|
"""HEAD /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}.
|
||||||
|
@ -114,8 +115,47 @@ class EndpointFilterCRUDTestCase(EndpointFilterTestCase):
|
||||||
'endpoint_id': uuid.uuid4().hex},
|
'endpoint_id': uuid.uuid4().hex},
|
||||||
expected_status=http_client.NOT_FOUND)
|
expected_status=http_client.NOT_FOUND)
|
||||||
|
|
||||||
|
def test_get_endpoint_project_association(self):
|
||||||
|
"""GET /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}.
|
||||||
|
|
||||||
|
Valid project and endpoint id test case.
|
||||||
|
|
||||||
|
"""
|
||||||
|
self.put(self.default_request_url)
|
||||||
|
self.get('/OS-EP-FILTER/projects/%(project_id)s'
|
||||||
|
'/endpoints/%(endpoint_id)s' % {
|
||||||
|
'project_id': self.default_domain_project_id,
|
||||||
|
'endpoint_id': self.endpoint_id},
|
||||||
|
expected_status=http_client.NO_CONTENT)
|
||||||
|
|
||||||
|
def test_get_endpoint_project_association_with_invalid_project(self):
|
||||||
|
"""GET /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}.
|
||||||
|
|
||||||
|
Invalid project id test case.
|
||||||
|
|
||||||
|
"""
|
||||||
|
self.put(self.default_request_url)
|
||||||
|
self.get('/OS-EP-FILTER/projects/%(project_id)s'
|
||||||
|
'/endpoints/%(endpoint_id)s' % {
|
||||||
|
'project_id': uuid.uuid4().hex,
|
||||||
|
'endpoint_id': self.endpoint_id},
|
||||||
|
expected_status=http_client.NOT_FOUND)
|
||||||
|
|
||||||
|
def test_get_endpoint_project_association_with_invalid_endpoint(self):
|
||||||
|
"""GET /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}.
|
||||||
|
|
||||||
|
Invalid endpoint id test case.
|
||||||
|
|
||||||
|
"""
|
||||||
|
self.put(self.default_request_url)
|
||||||
|
self.get('/OS-EP-FILTER/projects/%(project_id)s'
|
||||||
|
'/endpoints/%(endpoint_id)s' % {
|
||||||
|
'project_id': self.default_domain_project_id,
|
||||||
|
'endpoint_id': uuid.uuid4().hex},
|
||||||
|
expected_status=http_client.NOT_FOUND)
|
||||||
|
|
||||||
def test_list_endpoints_associated_with_valid_project(self):
|
def test_list_endpoints_associated_with_valid_project(self):
|
||||||
"""GET /OS-EP-FILTER/projects/{project_id}/endpoints.
|
"""GET & HEAD /OS-EP-FILTER/projects/{project_id}/endpoints.
|
||||||
|
|
||||||
Valid project and endpoint id test case.
|
Valid project and endpoint id test case.
|
||||||
|
|
||||||
|
@ -126,20 +166,23 @@ class EndpointFilterCRUDTestCase(EndpointFilterTestCase):
|
||||||
r = self.get(resource_url)
|
r = self.get(resource_url)
|
||||||
self.assertValidEndpointListResponse(r, self.endpoint,
|
self.assertValidEndpointListResponse(r, self.endpoint,
|
||||||
resource_url=resource_url)
|
resource_url=resource_url)
|
||||||
|
self.head(resource_url, expected_status=http_client.OK)
|
||||||
|
|
||||||
def test_list_endpoints_associated_with_invalid_project(self):
|
def test_list_endpoints_associated_with_invalid_project(self):
|
||||||
"""GET /OS-EP-FILTER/projects/{project_id}/endpoints.
|
"""GET & HEAD /OS-EP-FILTER/projects/{project_id}/endpoints.
|
||||||
|
|
||||||
Invalid project id test case.
|
Invalid project id test case.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.put(self.default_request_url)
|
self.put(self.default_request_url)
|
||||||
self.get('/OS-EP-FILTER/projects/%(project_id)s/endpoints' % {
|
url = ('/OS-EP-FILTER/projects/%(project_id)s/endpoints' % {
|
||||||
'project_id': uuid.uuid4().hex},
|
'project_id': uuid.uuid4().hex}
|
||||||
expected_status=http_client.NOT_FOUND)
|
)
|
||||||
|
self.get(url, expected_status=http_client.NOT_FOUND)
|
||||||
|
self.head(url, expected_status=http_client.NOT_FOUND)
|
||||||
|
|
||||||
def test_list_projects_associated_with_endpoint(self):
|
def test_list_projects_associated_with_endpoint(self):
|
||||||
"""GET /OS-EP-FILTER/endpoints/{endpoint_id}/projects.
|
"""GET & HEAD /OS-EP-FILTER/endpoints/{endpoint_id}/projects.
|
||||||
|
|
||||||
Valid endpoint-project association test case.
|
Valid endpoint-project association test case.
|
||||||
|
|
||||||
|
@ -147,29 +190,37 @@ class EndpointFilterCRUDTestCase(EndpointFilterTestCase):
|
||||||
self.put(self.default_request_url)
|
self.put(self.default_request_url)
|
||||||
resource_url = '/OS-EP-FILTER/endpoints/%(endpoint_id)s/projects' % {
|
resource_url = '/OS-EP-FILTER/endpoints/%(endpoint_id)s/projects' % {
|
||||||
'endpoint_id': self.endpoint_id}
|
'endpoint_id': self.endpoint_id}
|
||||||
r = self.get(resource_url)
|
r = self.get(resource_url, expected_status=http_client.OK)
|
||||||
self.assertValidProjectListResponse(r, self.default_domain_project,
|
self.assertValidProjectListResponse(r, self.default_domain_project,
|
||||||
resource_url=resource_url)
|
resource_url=resource_url)
|
||||||
|
self.head(resource_url, expected_status=http_client.OK)
|
||||||
|
|
||||||
def test_list_projects_with_no_endpoint_project_association(self):
|
def test_list_projects_with_no_endpoint_project_association(self):
|
||||||
"""GET /OS-EP-FILTER/endpoints/{endpoint_id}/projects.
|
"""GET & HEAD /OS-EP-FILTER/endpoints/{endpoint_id}/projects.
|
||||||
|
|
||||||
Valid endpoint id but no endpoint-project associations test case.
|
Valid endpoint id but no endpoint-project associations test case.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
r = self.get('/OS-EP-FILTER/endpoints/%(endpoint_id)s/projects' %
|
url = (
|
||||||
{'endpoint_id': self.endpoint_id})
|
'/OS-EP-FILTER/endpoints/%(endpoint_id)s/projects' %
|
||||||
|
{'endpoint_id': self.endpoint_id}
|
||||||
|
)
|
||||||
|
r = self.get(url, expected_status=http_client.OK)
|
||||||
self.assertValidProjectListResponse(r, expected_length=0)
|
self.assertValidProjectListResponse(r, expected_length=0)
|
||||||
|
self.head(url, expected_status=http_client.OK)
|
||||||
|
|
||||||
def test_list_projects_associated_with_invalid_endpoint(self):
|
def test_list_projects_associated_with_invalid_endpoint(self):
|
||||||
"""GET /OS-EP-FILTER/endpoints/{endpoint_id}/projects.
|
"""GET & HEAD /OS-EP-FILTER/endpoints/{endpoint_id}/projects.
|
||||||
|
|
||||||
Invalid endpoint id test case.
|
Invalid endpoint id test case.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.get('/OS-EP-FILTER/endpoints/%(endpoint_id)s/projects' %
|
url = (
|
||||||
{'endpoint_id': uuid.uuid4().hex},
|
'/OS-EP-FILTER/endpoints/%(endpoint_id)s/projects' %
|
||||||
expected_status=http_client.NOT_FOUND)
|
{'endpoint_id': uuid.uuid4().hex}
|
||||||
|
)
|
||||||
|
self.get(url, expected_status=http_client.NOT_FOUND)
|
||||||
|
self.head(url, expected_status=http_client.NOT_FOUND)
|
||||||
|
|
||||||
def test_remove_endpoint_project_association(self):
|
def test_remove_endpoint_project_association(self):
|
||||||
"""DELETE /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}.
|
"""DELETE /OS-EP-FILTER/projects/{project_id}/endpoints/{endpoint_id}.
|
||||||
|
@ -911,7 +962,7 @@ class EndpointGroupCRUDTestCase(EndpointFilterTestCase):
|
||||||
self.get(url, expected_status=http_client.NOT_FOUND)
|
self.get(url, expected_status=http_client.NOT_FOUND)
|
||||||
|
|
||||||
def test_list_endpoint_groups_in_project(self):
|
def test_list_endpoint_groups_in_project(self):
|
||||||
"""GET /OS-EP-FILTER/projects/{project_id}/endpoint_groups."""
|
"""GET & HEAD /OS-EP-FILTER/projects/{project_id}/endpoint_groups."""
|
||||||
# create an endpoint group to work with
|
# create an endpoint group to work with
|
||||||
endpoint_group_id = self._create_valid_endpoint_group(
|
endpoint_group_id = self._create_valid_endpoint_group(
|
||||||
self.DEFAULT_ENDPOINT_GROUP_URL, self.DEFAULT_ENDPOINT_GROUP_BODY)
|
self.DEFAULT_ENDPOINT_GROUP_URL, self.DEFAULT_ENDPOINT_GROUP_BODY)
|
||||||
|
@ -923,27 +974,32 @@ class EndpointGroupCRUDTestCase(EndpointFilterTestCase):
|
||||||
|
|
||||||
url = ('/OS-EP-FILTER/projects/%(project_id)s/endpoint_groups' %
|
url = ('/OS-EP-FILTER/projects/%(project_id)s/endpoint_groups' %
|
||||||
{'project_id': self.project_id})
|
{'project_id': self.project_id})
|
||||||
response = self.get(url)
|
response = self.get(url, expected_status=http_client.OK)
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
endpoint_group_id,
|
endpoint_group_id,
|
||||||
response.result['endpoint_groups'][0]['id'])
|
response.result['endpoint_groups'][0]['id'])
|
||||||
|
|
||||||
|
self.head(url, expected_status=http_client.OK)
|
||||||
|
|
||||||
def test_list_endpoint_groups_in_invalid_project(self):
|
def test_list_endpoint_groups_in_invalid_project(self):
|
||||||
"""Test retrieving from invalid project."""
|
"""Test retrieving from invalid project."""
|
||||||
project_id = uuid.uuid4().hex
|
project_id = uuid.uuid4().hex
|
||||||
url = ('/OS-EP-FILTER/projects/%(project_id)s/endpoint_groups' %
|
url = ('/OS-EP-FILTER/projects/%(project_id)s/endpoint_groups' %
|
||||||
{'project_id': project_id})
|
{'project_id': project_id})
|
||||||
self.get(url, expected_status=http_client.NOT_FOUND)
|
self.get(url, expected_status=http_client.NOT_FOUND)
|
||||||
|
self.head(url, expected_status=http_client.NOT_FOUND)
|
||||||
|
|
||||||
def test_empty_endpoint_groups_in_project(self):
|
def test_empty_endpoint_groups_in_project(self):
|
||||||
"""Test when no endpoint groups associated with the project."""
|
"""Test when no endpoint groups associated with the project."""
|
||||||
url = ('/OS-EP-FILTER/projects/%(project_id)s/endpoint_groups' %
|
url = ('/OS-EP-FILTER/projects/%(project_id)s/endpoint_groups' %
|
||||||
{'project_id': self.project_id})
|
{'project_id': self.project_id})
|
||||||
response = self.get(url)
|
response = self.get(url, expected_status=http_client.OK)
|
||||||
|
|
||||||
self.assertEqual(0, len(response.result['endpoint_groups']))
|
self.assertEqual(0, len(response.result['endpoint_groups']))
|
||||||
|
|
||||||
|
self.head(url, expected_status=http_client.OK)
|
||||||
|
|
||||||
def test_check_endpoint_group_to_project(self):
|
def test_check_endpoint_group_to_project(self):
|
||||||
"""Test HEAD with a valid endpoint group and project association."""
|
"""Test HEAD with a valid endpoint group and project association."""
|
||||||
endpoint_group_id = self._create_valid_endpoint_group(
|
endpoint_group_id = self._create_valid_endpoint_group(
|
||||||
|
@ -972,20 +1028,22 @@ class EndpointGroupCRUDTestCase(EndpointFilterTestCase):
|
||||||
self.head(url, expected_status=http_client.NOT_FOUND)
|
self.head(url, expected_status=http_client.NOT_FOUND)
|
||||||
|
|
||||||
def test_list_endpoint_groups(self):
|
def test_list_endpoint_groups(self):
|
||||||
"""GET /OS-EP-FILTER/endpoint_groups."""
|
"""GET & HEAD /OS-EP-FILTER/endpoint_groups."""
|
||||||
# create an endpoint group to work with
|
# create an endpoint group to work with
|
||||||
endpoint_group_id = self._create_valid_endpoint_group(
|
endpoint_group_id = self._create_valid_endpoint_group(
|
||||||
self.DEFAULT_ENDPOINT_GROUP_URL, self.DEFAULT_ENDPOINT_GROUP_BODY)
|
self.DEFAULT_ENDPOINT_GROUP_URL, self.DEFAULT_ENDPOINT_GROUP_BODY)
|
||||||
|
|
||||||
# recover all endpoint groups
|
# recover all endpoint groups
|
||||||
url = '/OS-EP-FILTER/endpoint_groups'
|
url = '/OS-EP-FILTER/endpoint_groups'
|
||||||
r = self.get(url)
|
r = self.get(url, expected_status=http_client.OK)
|
||||||
self.assertNotEmpty(r.result['endpoint_groups'])
|
self.assertNotEmpty(r.result['endpoint_groups'])
|
||||||
self.assertEqual(endpoint_group_id,
|
self.assertEqual(endpoint_group_id,
|
||||||
r.result['endpoint_groups'][0].get('id'))
|
r.result['endpoint_groups'][0].get('id'))
|
||||||
|
|
||||||
|
self.head(url, expected_status=http_client.OK)
|
||||||
|
|
||||||
def test_list_projects_associated_with_endpoint_group(self):
|
def test_list_projects_associated_with_endpoint_group(self):
|
||||||
"""GET /OS-EP-FILTER/endpoint_groups/{endpoint_group}/projects.
|
"""GET & HEAD /OS-EP-FILTER/endpoint_groups/{endpoint_group}/projects.
|
||||||
|
|
||||||
Valid endpoint group test case.
|
Valid endpoint group test case.
|
||||||
|
|
||||||
|
@ -1002,10 +1060,11 @@ class EndpointGroupCRUDTestCase(EndpointFilterTestCase):
|
||||||
url = ('/OS-EP-FILTER/endpoint_groups/%(endpoint_group_id)s'
|
url = ('/OS-EP-FILTER/endpoint_groups/%(endpoint_group_id)s'
|
||||||
'/projects' %
|
'/projects' %
|
||||||
{'endpoint_group_id': endpoint_group_id})
|
{'endpoint_group_id': endpoint_group_id})
|
||||||
self.get(url)
|
self.get(url, expected_status=http_client.OK)
|
||||||
|
self.head(url, expected_status=http_client.OK)
|
||||||
|
|
||||||
def test_list_endpoints_associated_with_endpoint_group(self):
|
def test_list_endpoints_associated_with_endpoint_group(self):
|
||||||
"""GET /OS-EP-FILTER/endpoint_groups/{endpoint_group}/endpoints.
|
"""GET & HEAD /OS-EP-FILTER/endpoint_groups/{endpoint_group}/endpoints.
|
||||||
|
|
||||||
Valid endpoint group test case.
|
Valid endpoint group test case.
|
||||||
|
|
||||||
|
@ -1038,12 +1097,13 @@ class EndpointGroupCRUDTestCase(EndpointFilterTestCase):
|
||||||
# recover list of endpoints associated with endpoint group
|
# recover list of endpoints associated with endpoint group
|
||||||
url = ('/OS-EP-FILTER/endpoint_groups/%(endpoint_group_id)s'
|
url = ('/OS-EP-FILTER/endpoint_groups/%(endpoint_group_id)s'
|
||||||
'/endpoints' % {'endpoint_group_id': endpoint_group_id})
|
'/endpoints' % {'endpoint_group_id': endpoint_group_id})
|
||||||
r = self.get(url)
|
r = self.get(url, expected_status=http_client.OK)
|
||||||
self.assertNotEmpty(r.result['endpoints'])
|
self.assertNotEmpty(r.result['endpoints'])
|
||||||
self.assertEqual(endpoint_id, r.result['endpoints'][0].get('id'))
|
self.assertEqual(endpoint_id, r.result['endpoints'][0].get('id'))
|
||||||
|
self.head(url, expected_status=http_client.OK)
|
||||||
|
|
||||||
def test_list_endpoints_associated_with_project_endpoint_group(self):
|
def test_list_endpoints_associated_with_project_endpoint_group(self):
|
||||||
"""GET /OS-EP-FILTER/projects/{project_id}/endpoints.
|
"""GET & HEAD /OS-EP-FILTER/projects/{project_id}/endpoints.
|
||||||
|
|
||||||
Valid project, endpoint id, and endpoint group test case.
|
Valid project, endpoint id, and endpoint group test case.
|
||||||
|
|
||||||
|
@ -1075,9 +1135,10 @@ class EndpointGroupCRUDTestCase(EndpointFilterTestCase):
|
||||||
# Now get a list of the filtered endpoints
|
# Now get a list of the filtered endpoints
|
||||||
endpoints_url = '/OS-EP-FILTER/projects/%(project_id)s/endpoints' % {
|
endpoints_url = '/OS-EP-FILTER/projects/%(project_id)s/endpoints' % {
|
||||||
'project_id': self.default_domain_project_id}
|
'project_id': self.default_domain_project_id}
|
||||||
r = self.get(endpoints_url)
|
r = self.get(endpoints_url, expected_status=http_client.OK)
|
||||||
endpoints = self.assertValidEndpointListResponse(r)
|
endpoints = self.assertValidEndpointListResponse(r)
|
||||||
self.assertEqual(2, len(endpoints))
|
self.assertEqual(2, len(endpoints))
|
||||||
|
self.head(endpoints_url, expected_status=http_client.OK)
|
||||||
|
|
||||||
# Ensure catalog includes the endpoints from endpoint_group project
|
# Ensure catalog includes the endpoints from endpoint_group project
|
||||||
# association, this is needed when a project scoped token is issued
|
# association, this is needed when a project scoped token is issued
|
||||||
|
@ -1121,13 +1182,15 @@ class EndpointGroupCRUDTestCase(EndpointFilterTestCase):
|
||||||
self.put(url)
|
self.put(url)
|
||||||
|
|
||||||
# check that we can recover the project endpoint group association
|
# check that we can recover the project endpoint group association
|
||||||
self.get(url)
|
self.get(url, expected_status=http_client.OK)
|
||||||
|
self.get(url, expected_status=http_client.OK)
|
||||||
|
|
||||||
# Now delete the project and then try and retrieve the project
|
# Now delete the project and then try and retrieve the project
|
||||||
# endpoint group association again
|
# endpoint group association again
|
||||||
self.delete('/projects/%(project_id)s' % {
|
self.delete('/projects/%(project_id)s' % {
|
||||||
'project_id': project['id']})
|
'project_id': project['id']})
|
||||||
self.get(url, expected_status=http_client.NOT_FOUND)
|
self.get(url, expected_status=http_client.NOT_FOUND)
|
||||||
|
self.head(url, expected_status=http_client.NOT_FOUND)
|
||||||
|
|
||||||
def test_endpoint_group_project_cleanup_with_endpoint_group(self):
|
def test_endpoint_group_project_cleanup_with_endpoint_group(self):
|
||||||
# create endpoint group
|
# create endpoint group
|
||||||
|
|
Loading…
Reference in New Issue