Bugzilla – Attachment 98912 Details for
Bug 22001
Add RaiseError and PrintError flags for all tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22001: Enable RaiseError for tests
Bug-22001-Enable-RaiseError-for-tests.patch (text/plain), 1.38 KB, created by
Jonathan Druart
on 2020-02-14 09:00:33 UTC
(
hide
)
Description:
Bug 22001: Enable RaiseError for tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-02-14 09:00:33 UTC
Size:
1.38 KB
patch
obsolete
>From a5afc97027f7927378ae48b2697e33ad95a48f04 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 14 Dec 2018 13:30:02 -0300 >Subject: [PATCH] Bug 22001: Enable RaiseError for tests > >--- > Koha/Database.pm | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/Koha/Database.pm b/Koha/Database.pm >index c04c60921c..900f941289 100644 >--- a/Koha/Database.pm >+++ b/Koha/Database.pm >@@ -86,13 +86,15 @@ sub _new_schema { > $encoding_query = "set client_encoding = 'UTF8';"; > $tz_query = qq(SET TIME ZONE = "$tz") if $tz; > } >+ >+ my $RaiseError = ( $ENV{DEBUG} || exists $ENV{_} && $ENV{_} =~ m|prove| ) ? 1 : 0; > my $schema = Koha::Schema->connect( > { > dsn => "dbi:$db_driver:database=$db_name;host=$db_host;port=$db_port".($tls_options? $tls_options : ""), > user => $db_user, > password => $db_passwd, > %encoding_attr, >- RaiseError => $ENV{DEBUG} ? 1 : 0, >+ RaiseError => $RaiseError, > PrintError => 1, > unsafe => 1, > quote_names => 1, >@@ -114,7 +116,7 @@ sub _new_schema { > $dbh->do(q| > SELECT * FROM systempreferences WHERE 1 = 0 | > ); >- $dbh->{RaiseError} = $ENV{DEBUG} ? 1 : 0; >+ $dbh->{RaiseError} = $RaiseError > }; > $dbh->{RaiseError} = 0 if $@; > >-- >2.11.0
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 22001
:
83230
|
83231
|
83232
|
98910
|
98911
|
98912
|
99589
|
99590
|
99591
|
101989
|
101990
|
101991
|
102070
|
102140
|
102147
|
102149
|
102150
|
102151
|
102152