Do not check account unlock if lockout config is 0
In test_user_account_lockout, if both CONF.identity.user_lockout_failure
_attempts and CONF.identity.user_lockout_duration are set to 0, the
testcase should be skipped.
Change-Id: Ie8fc407633708066e60322f73cdfed1a0a0dbd20
diff --git a/tempest/api/identity/v3/test_users.py b/tempest/api/identity/v3/test_users.py
index 6d6baca..13b5161 100644
--- a/tempest/api/identity/v3/test_users.py
+++ b/tempest/api/identity/v3/test_users.py
@@ -133,6 +133,13 @@
'Security compliance not available.')
@decorators.idempotent_id('a7ad8bbf-2cff-4520-8c1d-96332e151658')
def test_user_account_lockout(self):
+ if (CONF.identity.user_lockout_failure_attempts <= 0 or
+ CONF.identity.user_lockout_duration <= 0):
+ raise self.skipException(
+ "Both CONF.identity.user_lockout_failure_attempts and "
+ "CONF.identity.user_lockout_duration should be greater than "
+ "zero to test this feature")
+
password = self.creds.password
# First, we login using the correct credentials