Bugzilla – Attachment 50539 Details for
Bug 14144
Silence warnings t/db_dependent/Auth_with_ldap.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF]Bug 14144: Silence warnings t/db_dependent/Auth_with_ldap.t
SIGNED-OFFBug-14144-Silence-warnings-tdbdependentA.patch (text/plain), 3.70 KB, created by
Héctor Eduardo Castro Avalos
on 2016-04-21 18:11:51 UTC
(
hide
)
Description:
[SIGNED-OFF]Bug 14144: Silence warnings t/db_dependent/Auth_with_ldap.t
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-04-21 18:11:51 UTC
Size:
3.70 KB
patch
obsolete
>From 486b3b416d8208c6a46d367450fb0f89f6401061 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Mon, 4 Apr 2016 18:07:26 -0400 >Subject: [PATCH] [SIGNED-OFF]Bug 14144: Silence warnings > t/db_dependent/Auth_with_ldap.t > >Revisiting this bug, I noticed that C4::Context->config() was mocked >poorly. I expanded the mock function a little and have quieted the >test which seemed to be working in a broken manner before. > >TEST PLAN >--------- >1) prove t/db_dependend/Auth_with_ldap.t > -- shibboleth noise >2) apply this patch >3) prove t/db_dependend/Auth_with_ldap.t > -- no noise >4) run koha qa test tools > >Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> >--- > t/db_dependent/Auth_with_ldap.t | 71 +++++++++++++++++++++++---------------- > 1 file changed, 42 insertions(+), 29 deletions(-) > >diff --git a/t/db_dependent/Auth_with_ldap.t b/t/db_dependent/Auth_with_ldap.t >index 9d68055..5b4e532 100755 >--- a/t/db_dependent/Auth_with_ldap.t >+++ b/t/db_dependent/Auth_with_ldap.t >@@ -270,37 +270,50 @@ subtest "search_method tests" => sub { > > # Function that mocks the call to C4::Context->config(param) > sub mockedC4Config { >- >+ my $class = shift; > my $param = shift; > >- my %ldap_mapping = ( >- firstname => { is => 'givenname' }, >- surname => { is => 'sn' }, >- address => { is => 'postaladdress' }, >- city => { is => 'l' }, >- zipcode => { is => 'postalcode' }, >- branchcode => { is => 'branch' }, >- userid => { is => 'uid' }, >- password => { is => 'userpassword' }, >- email => { is => 'mail' }, >- categorycode => { is => 'employeetype' }, >- phone => { is => 'telephonenumber' } >- ); >- >- my %ldap_config = ( >- anonymous_bind => $anonymous_bind, >- auth_by_bind => $auth_by_bind, >- base => 'dc=metavore,dc=com', >- hostname => 'localhost', >- mapping => \%ldap_mapping, >- pass => 'metavore', >- principal_name => '%s@my_domain.com', >- replicate => $replicate, >- update => $update, >- user => 'cn=Manager,dc=metavore,dc=com' >- ); >- >- return \%ldap_config; >+ if ($param eq 'useshibboleth') { >+ return 0; >+ } >+ elsif ($param eq 'ldapserver') { >+ my %ldap_mapping = ( >+ firstname => { is => 'givenname' }, >+ surname => { is => 'sn' }, >+ address => { is => 'postaladdress' }, >+ city => { is => 'l' }, >+ zipcode => { is => 'postalcode' }, >+ branchcode => { is => 'branch' }, >+ userid => { is => 'uid' }, >+ password => { is => 'userpassword' }, >+ email => { is => 'mail' }, >+ categorycode => { is => 'employeetype' }, >+ phone => { is => 'telephonenumber' } >+ ); >+ >+ my %ldap_config = ( >+ anonymous_bind => $anonymous_bind, >+ auth_by_bind => $auth_by_bind, >+ base => 'dc=metavore,dc=com', >+ hostname => 'localhost', >+ mapping => \%ldap_mapping, >+ pass => 'metavore', >+ principal_name => '%s@my_domain.com', >+ replicate => $replicate, >+ update => $update, >+ user => 'cn=Manager,dc=metavore,dc=com' >+ ); >+ return \%ldap_config; >+ } >+ elsif ($param =~ /(intranetdir|opachtdocs|intrahtdocs)/ ) { >+ return ''; >+ } >+ elsif (ref $class eq 'HASH') { >+ return $class->{$param}; >+ } >+ else { >+ return; >+ } > }; > > # Function that mocks the call to Net::LDAP >-- >1.7.10.4
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 14144
:
38835
|
38836
|
49882
|
49883
|
49884
|
49885
|
49886
|
50538
|
50539
|
50540
|
50920
|
50921