Bugzilla – Attachment 147156 Details for
Bug 32057
Add optional stack trace to action logs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32057: (QA follow-up) Add a simple test
Bug-32057-QA-follow-up-Add-a-simple-test.patch (text/plain), 1.57 KB, created by
Marcel de Rooy
on 2023-02-22 13:56:15 UTC
(
hide
)
Description:
Bug 32057: (QA follow-up) Add a simple test
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-02-22 13:56:15 UTC
Size:
1.57 KB
patch
obsolete
>From d6d806fb015caa1c02d570ab684738d417020b6c Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Wed, 22 Feb 2023 13:53:35 +0000 >Subject: [PATCH] Bug 32057: (QA follow-up) Add a simple test >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Log.t | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Log.t b/t/db_dependent/Log.t >index cfdbab3102..ed2334f853 100755 >--- a/t/db_dependent/Log.t >+++ b/t/db_dependent/Log.t >@@ -16,7 +16,7 @@ > > use Modern::Perl; > use Data::Dumper qw( Dumper ); >-use Test::More tests => 4; >+use Test::More tests => 5; > > use C4::Context; > use C4::Log qw( logaction cronlogaction ); >@@ -90,6 +90,21 @@ subtest 'logaction(): interface is correctly logged' => sub { > is( $log->interface, 'sip', 'Passed interface is respected (sip)'); > }; > >+subtest 'logaction / trace' => sub { >+ plan tests => 2; >+ >+ C4::Context->interface( 'intranet' ); >+ t::lib::Mocks::mock_preference('ActionLogsTraceDepth',0); >+ >+ logaction( "MEMBERS", "MODIFY", 1, "test1"); >+ is( Koha::ActionLogs->search({ info => 'test1' })->last->trace, undef, 'No trace at level 0' ); >+ t::lib::Mocks::mock_preference('ActionLogsTraceDepth',2); >+ logaction( "MEMBERS", "MODIFY", 1, "test2"); >+ like( Koha::ActionLogs->search({ info => 'test2' })->last->trace, qr/("line":.*){2}/, 'Found two trace levels' ); >+ >+ t::lib::Mocks::mock_preference('ActionLogsTraceDepth',0); >+}; >+ > subtest 'GDPR logging' => sub { > plan tests => 6; > >-- >2.30.2
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 32057
:
142855
|
142857
|
144734
|
144735
|
144736
|
144737
|
144738
|
144769
|
144786
|
144787
|
144788
|
147152
|
147153
|
147154
|
147155
| 147156 |
148162