diff options
author | Derek Higgins <derekh@redhat.com> | 2012-06-05 09:33:53 +0100 |
---|---|---|
committer | Derek Higgins <derekh@redhat.com> | 2012-06-05 15:27:13 +0100 |
commit | 375838cfceb88cacc312ff6564e64eb18ee6a355 (patch) | |
tree | 36a5ac966b652e69b39f70d5596b027c5ee972a6 /tests/test_keystoneclient.py | |
parent | 17723a6b6dc047e6341bcfcda29120580f352b46 (diff) | |
download | keystone-375838cfceb88cacc312ff6564e64eb18ee6a355.tar.gz keystone-375838cfceb88cacc312ff6564e64eb18ee6a355.tar.xz keystone-375838cfceb88cacc312ff6564e64eb18ee6a355.zip |
Carrying over token expiry time when token chaining
Fixes bug #998185
This commit causes the token expiry time to be maintained when
one token is being created from another
Change-Id: I7b61692a60d9227423b93c267864a5abe939ca33
Diffstat (limited to 'tests/test_keystoneclient.py')
-rw-r--r-- | tests/test_keystoneclient.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_keystoneclient.py b/tests/test_keystoneclient.py index 68f190fa..dc26c959 100644 --- a/tests/test_keystoneclient.py +++ b/tests/test_keystoneclient.py @@ -14,6 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. +import time import uuid import nose.exc @@ -333,6 +334,17 @@ class KeystoneClientTests(object): self.get_client, self.user_foo) + def test_token_expiry_maintained(self): + foo_client = self.get_client(self.user_foo) + orig_token = foo_client.service_catalog.catalog['token'] + + time.sleep(1.01) + reauthenticated_token = foo_client.tokens.authenticate( + token=foo_client.auth_token) + + self.assertEquals(orig_token['expires'], + reauthenticated_token.expires) + def test_user_create_update_delete(self): from keystoneclient import exceptions as client_exceptions |