Bugzilla – Attachment 34002 Details for
Bug 12831
local only logins should still work when ldap authentication is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12831: (RM followup) regression test
Bug-12831-RM-followup-regression-test.patch (text/plain), 2.28 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-11-27 17:47:38 UTC
(
hide
)
Description:
Bug 12831: (RM followup) regression test
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-11-27 17:47:38 UTC
Size:
2.28 KB
patch
obsolete
>From 22d3ebdb27515b2fa48c3323b006287fc4edbc3c Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Thu, 27 Nov 2014 14:41:39 -0300 >Subject: [PATCH] Bug 12831: (RM followup) regression test > >checkpw_ldap should return 0 if it is not an anonymous bind, and authentication >fails. This is better explained on the bug comments. This is just a regression >test for the revised functionality. > >To test: >- Run > $ prove t/db_dependent/Auth_with_ldap.t >=> FAIL: it fails because C4::Auth_with_ldap doesn't match the expected behaviour >- Apply the bugfix from Martin >- Run > $ prove t/db_dependent/Auth_with_ldap.t >=> SUCCESS: tests now pass. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >--- > t/db_dependent/Auth_with_ldap.t | 18 +++++++++++++++++- > 1 file changed, 17 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Auth_with_ldap.t b/t/db_dependent/Auth_with_ldap.t >index 878385f..4982248 100755 >--- a/t/db_dependent/Auth_with_ldap.t >+++ b/t/db_dependent/Auth_with_ldap.t >@@ -84,7 +84,7 @@ subtest "checkpw_ldap tests" => sub { > > subtest "auth_by_bind = 1 tests" => sub { > >- plan tests => 5; >+ plan tests => 7; > > $auth_by_bind = 1; > >@@ -119,6 +119,22 @@ subtest "checkpw_ldap tests" => sub { > qr/LDAP bind failed as kohauser hola: LDAP error #1: error_name/, > "checkpw_ldap prints correct warning if LDAP bind fails"; > is ( $ret, -1, "checkpw_ldap returns -1 LDAP bind fails for user (Bug 8148)"); >+ >+ # regression tests for bug 12831 >+ $desired_authentication_result = 'error'; >+ $anonymous_bind = 0; >+ $desired_bind_result = 'error'; >+ $desired_search_result = 'success'; >+ $desired_count_result = 0; # user auth problem >+ $non_anonymous_bind_result = 'error'; >+ reload_ldap_module(); >+ >+ warning_like { $ret = C4::Auth_with_ldap::checkpw_ldap( >+ $dbh, 'hola', password => 'hey' ) } >+ qr/LDAP bind failed as kohauser hola: LDAP error #1: error_name/, >+ "checkpw_ldap prints correct warning if LDAP bind fails"; >+ is ( $ret, 0, "checkpw_ldap returns 0 LDAP bind fails for user (Bug 12831)"); >+ > }; > > subtest "auth_by_bind = 0 tests" => sub { >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12831
:
31275
|
31619
|
33868
|
33946
|
33989
| 34002 |
34003