Bugzilla – Attachment 153035 Details for
Bug 17427
Replace CGI::Session with Data::Session
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17427: Remove SessionStorage mock from tests
Bug-17427-Remove-SessionStorage-mock-from-tests.patch (text/plain), 5.60 KB, created by
Jonathan Druart
on 2023-07-05 08:04:19 UTC
(
hide
)
Description:
Bug 17427: Remove SessionStorage mock from tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-07-05 08:04:19 UTC
Size:
5.60 KB
patch
obsolete
>From 3f70a5890b26397fd814a8a842b6f725dc2261fb Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 4 May 2023 09:32:21 +0200 >Subject: [PATCH] Bug 17427: Remove SessionStorage mock from tests > >--- > t/db_dependent/Auth.t | 3 --- > t/db_dependent/Koha/REST/Plugin/Auth/IdP.t | 4 ---- > t/db_dependent/Koha_ExternalContent_OverDrive.t | 2 -- > t/db_dependent/Search/History.t | 4 ---- > t/db_dependent/api/v1/auth.t | 4 ---- > t/db_dependent/api/v1/auth_authenticate_api_request.t | 5 ----- > t/db_dependent/api/v1/idp.t | 4 ---- > t/db_dependent/api/v1/two_factor_auth.t | 4 ---- > 8 files changed, 30 deletions(-) > >diff --git a/t/db_dependent/Auth.t b/t/db_dependent/Auth.t >index 5c2aad72d41..785eaba1ee8 100755 >--- a/t/db_dependent/Auth.t >+++ b/t/db_dependent/Auth.t >@@ -29,9 +29,6 @@ BEGIN { > my $schema = Koha::Database->schema; > my $builder = t::lib::TestBuilder->new; > >-# FIXME: SessionStorage defaults to mysql, but it seems to break transaction >-# handling >-t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' ); > t::lib::Mocks::mock_preference( 'PrivacyPolicyConsent', '' ); # Disabled > > # To silence useless warnings >diff --git a/t/db_dependent/Koha/REST/Plugin/Auth/IdP.t b/t/db_dependent/Koha/REST/Plugin/Auth/IdP.t >index d3579cf9c1c..5909c1a0990 100755 >--- a/t/db_dependent/Koha/REST/Plugin/Auth/IdP.t >+++ b/t/db_dependent/Koha/REST/Plugin/Auth/IdP.t >@@ -77,10 +77,6 @@ use Koha::Database; > my $schema = Koha::Database->new()->schema(); > my $builder = t::lib::TestBuilder->new; > >-# FIXME: sessionStorage defaults to mysql, but it seems to break transaction handling >-# this affects the other REST api tests >-t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' ); >- > subtest 'auth.register helper' => sub { > plan tests => 6; > >diff --git a/t/db_dependent/Koha_ExternalContent_OverDrive.t b/t/db_dependent/Koha_ExternalContent_OverDrive.t >index d8c5c97289d..6f0e94f03e2 100755 >--- a/t/db_dependent/Koha_ExternalContent_OverDrive.t >+++ b/t/db_dependent/Koha_ExternalContent_OverDrive.t >@@ -18,8 +18,6 @@ BEGIN { > > use_ok('Koha::ExternalContent::OverDrive'); > >-t::lib::Mocks::mock_preference('SessionStorage','tmp'); >- > t::lib::Mocks::mock_preference('OverDriveClientKey', 'DUMMY'); > t::lib::Mocks::mock_preference('OverDriveClientSecret', 'DUMMY'); > t::lib::Mocks::mock_preference('OverDriveLibraryID', 'DUMMY'); >diff --git a/t/db_dependent/Search/History.t b/t/db_dependent/Search/History.t >index 4c084e121a4..27fc0d38eb6 100755 >--- a/t/db_dependent/Search/History.t >+++ b/t/db_dependent/Search/History.t >@@ -23,10 +23,6 @@ my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; > my $dbh = C4::Context->dbh; > >-# FIXME: SessionStorage defaults to mysql, but it seems to break transaction >-# handling >-t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' ); >- > use_ok('Koha::DateUtils'); > use_ok('C4::Search::History', qw( add get delete get_from_session )); > >diff --git a/t/db_dependent/api/v1/auth.t b/t/db_dependent/api/v1/auth.t >index cdb171925c6..9e550c61b05 100755 >--- a/t/db_dependent/api/v1/auth.t >+++ b/t/db_dependent/api/v1/auth.t >@@ -30,10 +30,6 @@ use Koha::Database; > my $schema = Koha::Database->new->schema; > my $builder = t::lib::TestBuilder->new; > >-# FIXME: sessionStorage defaults to mysql, but it seems to break transaction handling >-# this affects the other REST api tests >-t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' ); >- > my $remote_address = '127.0.0.1'; > my $t = Test::Mojo->new('Koha::REST::V1'); > my $tx; >diff --git a/t/db_dependent/api/v1/auth_authenticate_api_request.t b/t/db_dependent/api/v1/auth_authenticate_api_request.t >index 10a61893e8b..9c47926e7bd 100755 >--- a/t/db_dependent/api/v1/auth_authenticate_api_request.t >+++ b/t/db_dependent/api/v1/auth_authenticate_api_request.t >@@ -36,11 +36,6 @@ my $builder = t::lib::TestBuilder->new(); > my $remote_address = '127.0.0.1'; > my $tx; > >-# FIXME: CGI::Session::Driver::DBI explicitly sets AutoCommit=1 [1] which breaks the rollback in out tests. >-# Until we change into some other library, set SessionStorage to 'tmp' >-# [1] https://metacpan.org/source/CGI::Session::Driver::DBI#L28 >-t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' ); >- > subtest 'token-based tests' => sub { > > if ( can_load( modules => { 'Net::OAuth2::AuthorizationServer' => undef } ) ) { >diff --git a/t/db_dependent/api/v1/idp.t b/t/db_dependent/api/v1/idp.t >index c67b5124e00..880484151e1 100755 >--- a/t/db_dependent/api/v1/idp.t >+++ b/t/db_dependent/api/v1/idp.t >@@ -36,10 +36,6 @@ use Koha::Auth::Identity::Provider::Domains; > my $schema = Koha::Database->new->schema; > my $builder = t::lib::TestBuilder->new; > >-# FIXME: sessionStorage defaults to mysql, but it seems to break transaction handling >-# this affects the other REST api tests >-t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' ); >- > my $remote_address = '127.0.0.1'; > > # use t::lib::IdP::ExternalIdP; >diff --git a/t/db_dependent/api/v1/two_factor_auth.t b/t/db_dependent/api/v1/two_factor_auth.t >index 3a890c3d652..9eefa3300ad 100755 >--- a/t/db_dependent/api/v1/two_factor_auth.t >+++ b/t/db_dependent/api/v1/two_factor_auth.t >@@ -29,10 +29,6 @@ use Koha::Database; > my $schema = Koha::Database->new->schema; > my $builder = t::lib::TestBuilder->new; > >-# FIXME: sessionStorage defaults to mysql, but it seems to break transaction handling >-# this affects the other REST api tests >-t::lib::Mocks::mock_preference( 'SessionStorage', 'tmp' ); >- > my $remote_address = '127.0.0.1'; > my $t = Test::Mojo->new('Koha::REST::V1'); > >-- >2.25.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 17427
:
56185
|
56504
|
56572
|
57067
|
60355
|
121337
|
121633
|
121657
|
121658
|
121659
|
150569
|
150570
|
150571
|
150603
|
150604
|
150605
|
150606
|
150633
|
150634
|
150635
|
150636
|
150637
|
150638
|
150639
|
150926
|
150927
|
150928
|
150929
|
150930
|
150931
|
153030
|
153031
|
153032
|
153033
|
153034
| 153035 |
153036
|
153037
|
153038
|
153039
|
153040