In integration tests wait 1 second after changing the password
This should give us 1 second that's needed for Keystone to distinguish between the moment of token revocation and a login attempt, since Fernet tokens don't have subsecond precision. Change-Id: Iedfb9ea5efe11d05ba7b12fa590fdf9e01c3d734 Related-Bug: #1578866 Related-Bug: #1473567
This commit is contained in:
@@ -10,6 +10,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import time
|
||||||
|
|
||||||
from selenium.webdriver.common import by
|
from selenium.webdriver.common import by
|
||||||
|
|
||||||
from openstack_dashboard.test.integration_tests.pages import basepage
|
from openstack_dashboard.test.integration_tests.pages import basepage
|
||||||
@@ -35,6 +37,11 @@ class ChangepasswordPage(basepage.BaseNavigationPage):
|
|||||||
self.password_form.new_password.text = new
|
self.password_form.new_password.text = new
|
||||||
self.password_form.confirm_password.text = new
|
self.password_form.confirm_password.text = new
|
||||||
self.password_form.submit()
|
self.password_form.submit()
|
||||||
|
# NOTE(tsufiev): try to apply the same fix as Tempest did for the
|
||||||
|
# issue of Keystone Fernet tokens lacking sub-second precision
|
||||||
|
# (in which case it's possible to log in the same second that
|
||||||
|
# token was revoked due to password change), see bug 1473567
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
def reset_to_default_password(self, current):
|
def reset_to_default_password(self, current):
|
||||||
if self.topbar.user.text == self.conf.identity.admin_username:
|
if self.topbar.user.text == self.conf.identity.admin_username:
|
||||||
|
Reference in New Issue
Block a user