Move identity wait until after password is updated
With Ied83448de8af1b0da9afdfe6ce9431438215bfe0 merging, we should be waiting
after the password is updated and before we reauthenticate. This change fixes
this to be correct. For some reason a transient failure didn't cause the tests
to fail.
Change-Id: I7286085325c3578958234176adb7588afdcac578
Closes-Bug: 1473567
diff --git a/tempest/api/identity/v2/test_users.py b/tempest/api/identity/v2/test_users.py
index 50aaa25..03c6621 100644
--- a/tempest/api/identity/v2/test_users.py
+++ b/tempest/api/identity/v2/test_users.py
@@ -55,6 +55,10 @@
new_pass=old_pass,
old_pass=new_pass)
+ # user updates own password
+ resp = self.non_admin_client.update_user_own_password(
+ user_id=user_id, new_pass=new_pass, old_pass=old_pass)['access']
+
# TODO(lbragstad): Sleeping after the response status has been checked
# and the body loaded as JSON allows requests to fail-fast. The sleep
# is necessary because keystone will err on the side of security and
@@ -64,10 +68,6 @@
# sub-second precision.
time.sleep(1)
- # user updates own password
- resp = self.non_admin_client.update_user_own_password(
- user_id=user_id, new_pass=new_pass, old_pass=old_pass)['access']
-
# check authorization with new token
self.non_admin_token_client.auth_token(resp['token']['id'])
# check authorization with new password
diff --git a/tempest/api/identity/v3/test_users.py b/tempest/api/identity/v3/test_users.py
index 14a866f..2bab5d1 100644
--- a/tempest/api/identity/v3/test_users.py
+++ b/tempest/api/identity/v3/test_users.py
@@ -54,6 +54,10 @@
password=old_pass,
original_password=new_pass)
+ # user updates own password
+ self.non_admin_client.update_user_password(
+ user_id=user_id, password=new_pass, original_password=old_pass)
+
# TODO(lbragstad): Sleeping after the response status has been checked
# and the body loaded as JSON allows requests to fail-fast. The sleep
# is necessary because keystone will err on the side of security and
@@ -63,10 +67,6 @@
# sub-second precision.
time.sleep(1)
- # user updates own password
- self.non_admin_client.update_user_password(
- user_id=user_id, password=new_pass, original_password=old_pass)
-
# check authorization with new password
self.non_admin_token.auth(user_id=self.user_id, password=new_pass)