Bugzilla – Attachment 74882 Details for
Bug 20665
OAI-PMH Provider should reset MySQL connection time zone
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20665: Units tests for testing MySQL connection time zone
Bug-20665-Units-tests-for-testing-MySQL-connection.patch (text/plain), 1.75 KB, created by
Mark Tompsett
on 2018-04-26 13:13:31 UTC
(
hide
)
Description:
Bug 20665: Units tests for testing MySQL connection time zone
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-04-26 13:13:31 UTC
Size:
1.75 KB
patch
obsolete
>From 7325f01113e09308332a09d1274ac32fef7aec94 Mon Sep 17 00:00:00 2001 >From: Ere Maijala <ere.maijala@helsinki.fi> >Date: Thu, 26 Apr 2018 13:05:51 +0000 >Subject: [PATCH] Bug 20665: Units tests for testing MySQL connection time zone > >TEST PLAN >--------- >apply this test patch >prove t/db_dependent/OAI/Server.t >-- should fail >apply the other patch >prove t/db_dependent/OAI/Server.t >-- should pass >run koha qa test tools > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > t/db_dependent/OAI/Server.t | 24 +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t >index 7309c4a..f924994 100644 >--- a/t/db_dependent/OAI/Server.t >+++ b/t/db_dependent/OAI/Server.t >@@ -20,7 +20,7 @@ > use Modern::Perl; > use Test::MockTime qw/set_fixed_time restore_time/; > >-use Test::More tests => 29; >+use Test::More tests => 30; > use DateTime; > use Test::MockModule; > use Test::Warn; >@@ -376,4 +376,26 @@ subtest 'Bug 19725: OAI-PMH ListRecords and ListIdentifiers should use biblio_me > }); > }; > >+subtest 'Bug 20665: OAI-PMH Provider should reset the MySQL connection time zone' => sub { >+ plan tests => 2; >+ >+ # Set time zone to SYSTEM so that it can be checked later >+ $dbh->do("SET time_zone='SYSTEM'"); >+ >+ >+ test_query('ListIdentifiers without metadataPrefix', {verb => 'ListIdentifiers'}, { >+ error => { >+ code => 'badArgument', >+ content => "Required argument 'metadataPrefix' was undefined", >+ }, >+ }); >+ >+ my $sth = C4::Context->dbh->prepare('SELECT @@session.time_zone'); >+ $sth->execute(); >+ my ( $tz ) = $sth->fetchrow(); >+ >+ ok ( $tz eq 'SYSTEM', 'MySQL connection time zone is SYSTEM' ); >+}; >+ >+ > $schema->storage->txn_rollback; >-- >2.1.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 20665
:
74880
|
74882
|
74883
|
74889
|
74890