Add skip for disabled user test until associated bug is fixed
Turns out the PUT /users/<USER_ID/enabled call in Keystone
admin API extension is broken until the fix for the associated
bug is in. This adds the skip until that is done.
Change-Id: Ia5d032ebc68c99c9db40e8d96776d81f61a47aec
Fixes: LP 1018635
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index dd5e3cf..e8c741a 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -222,8 +222,11 @@
if 'cloudServersFault' in resp_body:
message = resp_body['cloudServersFault']['message']
- else:
+ elif 'computeFault' in resp_body:
message = resp_body['computeFault']['message']
+ elif 'error' in resp_body: # Keystone errors
+ message = resp_body['error']['message']
+ raise exceptions.IdentityError(message)
raise exceptions.ComputeFault(message)
if resp.status >= 400:
diff --git a/tempest/exceptions.py b/tempest/exceptions.py
index 837dac1..39463d7 100644
--- a/tempest/exceptions.py
+++ b/tempest/exceptions.py
@@ -81,6 +81,10 @@
message = "Got compute fault"
+class IdentityError(TempestException):
+ message = "Got identity error"
+
+
class Duplicate(TempestException):
message = "An object with that identifier already exists"
diff --git a/tempest/tests/identity/admin/test_users.py b/tempest/tests/identity/admin/test_users.py
index df795e5..9dc3919 100644
--- a/tempest/tests/identity/admin/test_users.py
+++ b/tempest/tests/identity/admin/test_users.py
@@ -163,6 +163,7 @@
self.assertEqual('200', resp['status'])
@attr(type='negative')
+ @unittest.skip('Until Bug 1022411 is fixed')
def test_authentication_for_disabled_user(self):
"""Disabled user's token should not get authenticated"""
self.data.setup_test_user()