endpoint-crud 404 (bug 963056)
endpoint-create endpoint-delete Change-Id: I70ae14ca385a0ed2d3438b8dc2f7ba93b91f400b
This commit is contained in:
parent
9e4fe654ed
commit
9cf91c951e
@ -74,7 +74,7 @@ class NotFound(Error):
|
||||
|
||||
|
||||
class EndpointNotFound(NotFound):
|
||||
"""Could not find endopint: %(endpoint_id)s"""
|
||||
"""Could not find endpoint: %(endpoint_id)s"""
|
||||
|
||||
|
||||
class RoleNotFound(NotFound):
|
||||
|
@ -599,6 +599,25 @@ class KeystoneClientTests(object):
|
||||
client.services.get,
|
||||
id=uuid.uuid4().hex)
|
||||
|
||||
def test_endpoint_create_404(self):
|
||||
from keystoneclient import exceptions as client_exceptions
|
||||
client = self.get_client(admin=True)
|
||||
self.assertRaises(client_exceptions.NotFound,
|
||||
client.endpoints.create,
|
||||
region=uuid.uuid4().hex,
|
||||
service_id=uuid.uuid4().hex,
|
||||
publicurl=uuid.uuid4().hex,
|
||||
adminurl=uuid.uuid4().hex,
|
||||
internalurl=uuid.uuid4().hex)
|
||||
|
||||
def test_endpoint_delete_404(self):
|
||||
# the catalog backend is expected to return Not Implemented
|
||||
from keystoneclient import exceptions as client_exceptions
|
||||
client = self.get_client(admin=True)
|
||||
self.assertRaises(client_exceptions.HTTPNotImplemented,
|
||||
client.endpoints.delete,
|
||||
id=uuid.uuid4().hex)
|
||||
|
||||
def test_admin_requires_adminness(self):
|
||||
from keystoneclient import exceptions as client_exceptions
|
||||
# FIXME(ja): this should be Unauthorized
|
||||
@ -860,3 +879,9 @@ class KcEssex3TestCase(CompatTestCase, KeystoneClientTests):
|
||||
|
||||
def test_user_update_404(self):
|
||||
raise nose.exc.SkipTest('N/A')
|
||||
|
||||
def test_endpoint_create_404(self):
|
||||
raise nose.exc.SkipTest('N/A')
|
||||
|
||||
def test_endpoint_delete_404(self):
|
||||
raise nose.exc.SkipTest('N/A')
|
||||
|
@ -72,3 +72,10 @@ class KcMasterSqlTestCase(test_keystoneclient.KcMasterTestCase):
|
||||
client.endpoints.delete(id=endpoint.id)
|
||||
self.assertRaises(client_exceptions.NotFound, client.endpoints.delete,
|
||||
id=endpoint.id)
|
||||
|
||||
def test_endpoint_delete_404(self):
|
||||
from keystoneclient import exceptions as client_exceptions
|
||||
client = self.get_client(admin=True)
|
||||
self.assertRaises(client_exceptions.NotFound,
|
||||
client.endpoints.delete,
|
||||
id=uuid.uuid4().hex)
|
||||
|
Loading…
Reference in New Issue
Block a user