From 0d8f00f2df6de3735aa8fc47327ba063c511bb90 Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Thu, 8 Sep 2016 19:37:12 +0000 Subject: [PATCH] Allow for wait in _restore_password The _restore_password method within the test_user_update_own_password() tests attempts to authenticate right after changing a password. This patch makes it so that we wait one second before attempt the authentication call, similar to the pattern already established in the pre-existing test. Change-Id: Ia51f28a70ae099f1ec93851d271db8556aced836 --- tempest/api/identity/v2/test_users.py | 5 +++++ tempest/api/identity/v3/test_users.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tempest/api/identity/v2/test_users.py b/tempest/api/identity/v2/test_users.py index 4833f9e2ad..33d212ca30 100644 --- a/tempest/api/identity/v2/test_users.py +++ b/tempest/api/identity/v2/test_users.py @@ -44,6 +44,11 @@ class IdentityUsersTest(base.BaseIdentityV2Test): # Clear auth restores the original credentials and deletes # cached auth data client.auth_provider.clear_auth() + # NOTE(lbragstad): Fernet tokens are not subsecond aware and + # Keystone should only be precise to the second. Sleep to ensure we + # are passing the second boundary before attempting to + # authenticate. + time.sleep(1) client.auth_provider.set_auth() old_pass = self.creds.password diff --git a/tempest/api/identity/v3/test_users.py b/tempest/api/identity/v3/test_users.py index c92e750caf..1a38f3addd 100644 --- a/tempest/api/identity/v3/test_users.py +++ b/tempest/api/identity/v3/test_users.py @@ -44,6 +44,11 @@ class IdentityV3UsersTest(base.BaseIdentityV3Test): # Clear auth restores the original credentials and deletes # cached auth data client.auth_provider.clear_auth() + # NOTE(lbragstad): Fernet tokens are not subsecond aware and + # Keystone should only be precise to the second. Sleep to ensure we + # are passing the second boundary before attempting to + # authenticate. + time.sleep(1) client.auth_provider.set_auth() old_pass = self.creds.password