summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDolph Mathews <dolph.mathews@gmail.com>2012-03-25 11:32:08 -0500
committerDolph Mathews <dolph.mathews@gmail.com>2012-03-27 20:18:26 -0700
commit9cf91c951ed74e245693ca1f1b3df8965484dc94 (patch)
treec358907ae05ff1a369677c48add887feb7d0d5fa
parent9e4fe654ed3f2fa4040ccbcd0ccc003f56f9bce2 (diff)
downloadkeystone-9cf91c951ed74e245693ca1f1b3df8965484dc94.tar.gz
keystone-9cf91c951ed74e245693ca1f1b3df8965484dc94.tar.xz
keystone-9cf91c951ed74e245693ca1f1b3df8965484dc94.zip
endpoint-crud 404 (bug 963056)
endpoint-create endpoint-delete Change-Id: I70ae14ca385a0ed2d3438b8dc2f7ba93b91f400b
-rw-r--r--keystone/exception.py2
-rw-r--r--tests/test_keystoneclient.py25
-rw-r--r--tests/test_keystoneclient_sql.py7
3 files changed, 33 insertions, 1 deletions
diff --git a/keystone/exception.py b/keystone/exception.py
index c76201b0..f1651bf0 100644
--- a/keystone/exception.py
+++ b/keystone/exception.py
@@ -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):
diff --git a/tests/test_keystoneclient.py b/tests/test_keystoneclient.py
index aa2a5f6d..064a8e34 100644
--- a/tests/test_keystoneclient.py
+++ b/tests/test_keystoneclient.py
@@ -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')
diff --git a/tests/test_keystoneclient_sql.py b/tests/test_keystoneclient_sql.py
index 641ee770..9a13712a 100644
--- a/tests/test_keystoneclient_sql.py
+++ b/tests/test_keystoneclient_sql.py
@@ -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)