* Updating exitcodes in server_config.py.

* Addintion positive check when user password in LDAP changes.
This commit is contained in:
Vitaliy Zakaznikov 2020-07-09 22:01:53 +02:00
parent ba1fbc55be
commit a012ae3a70
2 changed files with 10 additions and 6 deletions

View File

@ -165,6 +165,10 @@ def login_after_user_password_changed_in_ldap(self, server):
exitcode=4,
message=f"DB::Exception: {user['cn']}: Authentication failed: password is incorrect or there is no user with such name"
)
with And("when I try to login with the new password it should work"):
login_and_execute_query(username=user["cn"], password="newpassword")
finally:
with Finally("I make sure LDAP user is deleted"):
if user is not None:

View File

@ -28,7 +28,7 @@ def invalid_host(self):
servers = {"foo": {"host": "foo", "port": "389", "enable_tls": "no"}}
users = [{
"server": "foo", "username": "user1", "password": "user1", "login": True,
"exitcode": 19, "message": "DB::Exception: Can't contact LDAP server"
"exitcode": 20, "message": "DB::Exception: Can't contact LDAP server"
}]
login(servers, *users)
@ -75,7 +75,7 @@ def invalid_port(self):
servers = {"openldap1": {"host": "openldap1", "port": "3890", "enable_tls": "no"}}
users = [{
"server": "openldap1", "username": "user1", "password": "user1", "login": True,
"exitcode": 19, "message": "DB::Exception: Can't contact LDAP server."
"exitcode": 20, "message": "DB::Exception: Can't contact LDAP server."
}]
login(servers, *users)
@ -93,7 +93,7 @@ def invalid_auth_dn_prefix(self):
}}
users = [{
"server": "openldap1", "username": "user1", "password": "user1", "login": True,
"exitcode": 19, "message": "DB::Exception: Invalid DN syntax: invalid DN"
"exitcode": 20, "message": "DB::Exception: Invalid DN syntax: invalid DN"
}]
login(servers, *users)
@ -110,7 +110,7 @@ def invalid_auth_dn_suffix(self):
}}
users = [{
"server": "openldap1", "username": "user1", "password": "user1", "login": True,
"exitcode": 19, "message": "DB::Exception: Invalid DN syntax: invalid DN"
"exitcode": 20, "message": "DB::Exception: Invalid DN syntax: invalid DN"
}]
login(servers, *users)
@ -167,7 +167,7 @@ def empty_ca_cert_dir(self):
}}
users = [{
"server": "openldap2", "username": "user2", "password": "user2", "login": True,
"exitcode": 19,
"exitcode": 20,
"message": "DB::Exception: Can't contact LDAP server: error:14000086:SSL routines::certificate verify failed (self signed certificate in certificate chain"
}]
login(servers, *users)
@ -187,7 +187,7 @@ def empty_ca_cert_file(self):
}}
users = [{
"server": "openldap2", "username": "user2", "password": "user2", "login": True,
"exitcode": 19,
"exitcode": 20,
"message": "Received from localhost:9000. DB::Exception: Can't contact LDAP server: error:14000086:SSL routines::certificate verify failed (self signed certificate in certificate chain)"
}]
login(servers, *users)