Bugzilla – Attachment 134637 Details for
Bug 28998
Encrypt borrowers.secret
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28998: (QA follow-up) Silence some useless warnings
Bug-28998-QA-follow-up-Silence-some-useless-warnin.patch (text/plain), 2.12 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-05-05 11:41:39 UTC
(
hide
)
Description:
Bug 28998: (QA follow-up) Silence some useless warnings
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-05-05 11:41:39 UTC
Size:
2.12 KB
patch
obsolete
>From 79f57cf303924ef96b8b55169e0290ef15dd3835 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 5 May 2022 08:39:50 -0300 >Subject: [PATCH] Bug 28998: (QA follow-up) Silence some useless warnings > >This patch fixes the tests and also silences some useless warnings about >REMOTE_ADDRESS not being defined. > >A test is added for a legit warning that is thrown. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Auth.t | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t >index 0ec2570bb9..46ad64ecff 100755 >--- a/t/db_dependent/Auth.t >+++ b/t/db_dependent/Auth.t >@@ -35,6 +35,9 @@ my $dbh = C4::Context->dbh; > t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' ); > t::lib::Mocks::mock_preference( 'GDPR_Policy', '' ); # Disabled > >+# To silence useless warnings >+$ENV{REMOTE_ADDR} = '127.0.0.1'; >+ > $schema->storage->txn_begin; > > subtest 'checkauth() tests' => sub { >@@ -148,7 +151,7 @@ subtest 'checkauth() tests' => sub { > } > > t::lib::Mocks::mock_preference( 'TwoFactorAuthentication', 0 ); >- $patron->secret('one_secret'); >+ $patron->encode_secret('one_secret'); > $patron->auth_method('password'); > $patron->store; > ( $userid, $cookie, $sessionID, $flags ) = C4::Auth::checkauth( $cgi, 'authrequired', undef, 'intranet' ); >@@ -509,7 +512,8 @@ subtest 'Check value of login_attempts in checkpw' => sub { > }; > > subtest '_timeout_syspref' => sub { >- plan tests => 5; >+ >+ plan tests => 6; > > t::lib::Mocks::mock_preference('timeout', "100"); > is( C4::Auth::_timeout_syspref, 100, ); >@@ -524,7 +528,10 @@ subtest '_timeout_syspref' => sub { > is( C4::Auth::_timeout_syspref, 10*3600, ); > > t::lib::Mocks::mock_preference('timeout', "10x"); >- is( C4::Auth::_timeout_syspref, 600, ); >+ warning_is >+ { is( C4::Auth::_timeout_syspref, 600, ); } >+ "The value of the system preference 'timeout' is not correct, defaulting to 600", >+ 'Bad values throw a warning and fallback to 600'; > }; > > subtest 'check_cookie_auth' => sub { >-- >2.34.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 28998
:
124772
|
124773
|
124774
|
133291
|
133317
|
133318
|
133319
|
133320
|
133321
|
133322
|
133323
|
133523
|
133524
|
133525
|
133526
|
133527
|
133528
|
133529
|
133580
|
133581
|
133582
|
133583
|
133584
|
133585
|
133586
|
133588
|
133619
|
133620
|
133621
|
133622
|
133623
|
133624
|
133625
|
133626
|
133627
|
133628
|
133629
|
133631
|
133632
|
133633
|
133634
|
133635
|
133636
|
133637
|
133638
|
133639
|
133640
|
133641
|
133642
|
133645
|
133646
|
133647
|
133648
|
133649
|
133650
|
133651
|
133652
|
133653
|
133654
|
133655
|
134636
| 134637 |
134671