Bugzilla – Attachment 139760 Details for
Bug 30242
REST API: Allow configuring log level
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30242: Add test
Bug-30242-Add-test.patch (text/plain), 1.79 KB, created by
Marcel de Rooy
on 2022-08-25 09:42:08 UTC
(
hide
)
Description:
Bug 30242: Add test
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-08-25 09:42:08 UTC
Size:
1.79 KB
patch
obsolete
>From 09514c55a382710ff3ec90ba0b8e09b6a873c28c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 25 Aug 2022 09:39:10 +0000 >Subject: [PATCH] Bug 30242: Add test >Content-Type: text/plain; charset=utf-8 > >Test plan: >Run t/db_dependent/Koha/REST/V1.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Koha/REST/V1.t | 24 ++++++++++++++++++++++-- > 1 file changed, 22 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/REST/V1.t b/t/db_dependent/Koha/REST/V1.t >index fc333a0814..cfc4441e05 100755 >--- a/t/db_dependent/Koha/REST/V1.t >+++ b/t/db_dependent/Koha/REST/V1.t >@@ -17,9 +17,11 @@ > > use Modern::Perl; > >-use Test::More tests => 1; >+use Test::More tests => 2; > use Test::Mojo; >-use Test::Warn; >+#use Test::Warn; >+ >+use t::lib::Mocks; > > subtest 'Type definition tests' => sub { > >@@ -40,3 +42,21 @@ subtest 'Type definition tests' => sub { > is( $types->type('mij'), 'application/marc-in-json', 'application/marc-in-json is defined' ); > is( $types->type('marc'), 'application/marc', 'application/marc is defined' ); > }; >+ >+subtest 'check log_level' => sub { >+ plan tests => 3; >+ my $test; >+ >+ t::lib::Mocks::mock_config( 'mojo_log_level', 'warn' ); >+ $test = Test::Mojo->new('Koha::REST::V1'); >+ is( $test->app->log->level, 'warn', 'Log level comes from koha-conf.xml'); >+ >+ t::lib::Mocks::mock_config( 'mojo_log_level', undef ); >+ t::lib::Mocks::mock_config( 'dev_install', 1 ); >+ $test = Test::Mojo->new('Koha::REST::V1'); >+ is( $test->app->log->level, 'trace', 'Log level falls back to trace for dev_install'); >+ >+ t::lib::Mocks::mock_config( 'dev_install', undef ); >+ $test = Test::Mojo->new('Koha::REST::V1'); >+ is( $test->app->log->level, 'info', 'Log level falls back to info otherwise'); >+}; >-- >2.20.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 30242
:
131433
|
139759
|
139760