Bugzilla – Attachment 80816 Details for
Bug 21597
Test suite is still failing with new default SQL modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21597: Field 'description' doesn't have a default value
Bug-21597-Field-description-doesnt-have-a-default-.patch (text/plain), 2.73 KB, created by
Jonathan Druart
on 2018-10-18 12:24:15 UTC
(
hide
)
Description:
Bug 21597: Field 'description' doesn't have a default value
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-10-18 12:24:15 UTC
Size:
2.73 KB
patch
obsolete
>From 085340060e7cd908590e5b78e05c158b1f18412d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 17 Oct 2018 19:26:32 -0300 >Subject: [PATCH] Bug 21597: Field 'description' doesn't have a default value > >Nick proposed another fix, see bug 21594. >The interface does not explode so I do not think we should make a DB >update in a rush. > >Fix t/db_dependent/Koha/Object.t and t/db_dependent/Koha/ApiKeys.t > >api_keys.description and api_keys.secret: > `secret` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL, > `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, > > # Failed test 'Exception is thrown correctly' > # at t/db_dependent/Koha/Object.t line 262. > # expecting: Koha::Exceptions::Object::FKConstraint > # found: DBIx::Class::Exception (DBIx::Class::Storage::DBI::_dbh_execute(): Field 'description' doesn't have a default value at /home/vagrant/kohaclone/Koha/Object.pm line 125 > # ) > # Looks like you planned 7 tests but ran 1. > # Looks like you failed 1 test of 1 run. > >and later, but not related: >Can't locate object method "message" via package >"DBIx::Class::Exception" at t/db_dependent/Koha/Object.t line 264. >--- > t/db_dependent/Koha/ApiKeys.t | 2 +- > t/db_dependent/Koha/Object.t | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/ApiKeys.t b/t/db_dependent/Koha/ApiKeys.t >index 7becc0dcb1..154f69c018 100755 >--- a/t/db_dependent/Koha/ApiKeys.t >+++ b/t/db_dependent/Koha/ApiKeys.t >@@ -80,7 +80,7 @@ subtest 'store() tests' => sub { > $patron_to_delete->delete; > > throws_ok >- { Koha::ApiKey->new({ patron_id => $deleted_id })->store } >+ { Koha::ApiKey->new({ patron_id => $deleted_id, description => 'a description' })->store } > 'Koha::Exceptions::Object::FKConstraint', > 'Invalid patron ID raises exception'; > is( $@->message, 'Broken FK constraint', 'Exception message is correct' ); >diff --git a/t/db_dependent/Koha/Object.t b/t/db_dependent/Koha/Object.t >index 746a0e8084..e1812bc1c6 100755 >--- a/t/db_dependent/Koha/Object.t >+++ b/t/db_dependent/Koha/Object.t >@@ -253,7 +253,7 @@ subtest 'store() tests' => sub { > my $patron_id = $patron->id; > $patron->delete; > >- my $api_key = Koha::ApiKey->new({ patron_id => $patron_id }); >+ my $api_key = Koha::ApiKey->new({ patron_id => $patron_id, secret => 'a secret', description => 'a description' }); > > my $print_error = $schema->storage->dbh->{PrintError}; > $schema->storage->dbh->{PrintError} = 0; >@@ -278,6 +278,7 @@ subtest 'store() tests' => sub { > my $new_api_key = Koha::ApiKey->new({ > patron_id => $patron_id, > secret => $api_key->secret, >+ description => 'a description', > }); > > throws_ok >-- >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 21597
:
80812
|
80813
|
80814
|
80815
|
80816
|
80821
|
80829
|
80830
|
80831
|
80832
|
80833
|
80834
|
80852
|
80853
|
80854
|
80855
|
80856
|
80857