Bugzilla – Attachment 58548 Details for
Bug 17234
ALTER IGNORE TABLE is invalid in mysql 5.7. This breaks updatedatabase.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17234: Two new functions lack tests
Bug-17234-Two-new-functions-lack-tests.patch (text/plain), 3.68 KB, created by
Mark Tompsett
on 2016-12-30 19:10:39 UTC
(
hide
)
Description:
Bug 17234: Two new functions lack tests
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2016-12-30 19:10:39 UTC
Size:
3.68 KB
patch
obsolete
>From 432bacda2a543e2112b1c189d3ea429a89453f79 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 30 Dec 2016 14:08:33 -0500 >Subject: [PATCH] Bug 17234: Two new functions lack tests > >This adds two tests to t/db_dependent/Installer.t > >TEST PLAN >--------- >1) Apply patch >2) prove -v t/db_dependent/Installer.t > -- column and constraint tests were added. >3) run koha qa test tools >--- > t/db_dependent/Installer.t | 69 ++++++++++++++++++++++++++++++++++++---------- > 1 file changed, 54 insertions(+), 15 deletions(-) > >diff --git a/t/db_dependent/Installer.t b/t/db_dependent/Installer.t >index 1fc9fc4..46d04c0 100644 >--- a/t/db_dependent/Installer.t >+++ b/t/db_dependent/Installer.t >@@ -1,23 +1,62 @@ > #!/usr/bin/perl > # >-# This Koha test module is a stub! >-# Add more tests here!!! >-# Bug 11541 >+# This file is part of Koha. >+# >+# Copyright (C) 2014 Aleisha Amohia (Bug 11541) >+# Copyright (C) 2016 Mark Tompsett (Bug 17234) >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. > >-use strict; >-use warnings; >+# This Koha test module is still a stub! >+# Add more tests here!!! > >-use Test::More tests => 9; >+use Modern::Perl; >+use Test::More tests => 11; >+use Koha::Database; > > BEGIN { >- use_ok('C4::Installer'); >+ use_ok('C4::Installer'); > } > >-ok ( my $installer = C4::Installer->new(), 'Testing NewInstaller' ); >-is ( ref $installer, 'C4::Installer', 'Testing class of object' ); >-is ( $installer->{'dbname'}, C4::Context->config("database"), 'Testing DbName' ); >-is ( $installer->{'dbms'}, C4::Context->config("db_scheme") ? C4::Context->config("db_scheme") : "mysql", 'Testing DbScheme' ); >-is ( $installer->{'hostname'}, C4::Context->config("hostname"), 'Testing Hostname' ); >-is ( $installer->{'port'}, C4::Context->config("port"), 'Testing Port' ); >-is ( $installer->{'user'}, C4::Context->config("user"), 'Testing User' ); >-is ( $installer->{'password'}, C4::Context->config("pass"), 'Testing Password' ); >+ok( my $installer = C4::Installer->new(), 'Testing NewInstaller' ); >+is( ref $installer, 'C4::Installer', 'Testing class of object' ); >+is( $installer->{'dbname'}, C4::Context->config('database'), 'Testing DbName' ); >+is( >+ $installer->{'dbms'}, >+ C4::Context->config('db_scheme') >+ ? C4::Context->config('db_scheme') >+ : 'mysql', >+ 'Testing DbScheme' >+); >+is( >+ $installer->{'hostname'}, >+ C4::Context->config('hostname'), >+ 'Testing Hostname' >+); >+is( $installer->{'port'}, C4::Context->config('port'), 'Testing Port' ); >+is( $installer->{'user'}, C4::Context->config('user'), 'Testing User' ); >+is( $installer->{'password'}, C4::Context->config('pass'), 'Testing Password' ); >+ >+# The borrower table is known to have columns and constraints. >+my $schema = Koha::Database->new->schema; >+my $source = $schema->source('Borrower'); >+ >+my @column_names = $source->columns(); >+my $column_name = $column_names[0]; >+ok( column_exists( 'borrowers', $column_name ), 'Known column does exist' ); >+ >+my @constraint_names = $source->unique_constraint_names(); >+my $constraint_name = $constraint_names[0]; >+ok( constraint_exists( 'borrowers', $constraint_name ), >+ 'Known constraint does exist' ); >-- >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 17234
:
55113
|
55144
|
55634
|
55635
|
55704
|
55722
|
55729
|
55833
|
56820
|
56821
|
56822
|
56823
|
56824
|
56825
|
58548
|
58551
|
58552
|
58865
|
59003