Bugzilla – Attachment 57522 Details for
Bug 17637
Auth_with_ldap.t is failing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17637: Fix tests Auth_with_ldap.t
Bug-17637-Fix-tests-Authwithldapt.patch (text/plain), 2.49 KB, created by
Jonathan Druart
on 2016-11-16 07:46:26 UTC
(
hide
)
Description:
Bug 17637: Fix tests Auth_with_ldap.t
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-11-16 07:46:26 UTC
Size:
2.49 KB
patch
obsolete
>From c2e3bad6bd9b3362cfbc86882c6d35e9acce1000 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 16 Nov 2016 07:44:03 +0000 >Subject: [PATCH] Bug 17637: Fix tests Auth_with_ldap.t > >Koha::Patron->delete create a transaction and so we need to use >txn_begin to have nested txn > >DBD::mysql::db begin_work failed: Already in a transaction >--- > t/db_dependent/00-strict.t | 24 ------------------------ > t/db_dependent/Auth_with_ldap.t | 10 ++++------ > 2 files changed, 4 insertions(+), 30 deletions(-) > delete mode 100644 t/db_dependent/00-strict.t > >diff --git a/t/db_dependent/00-strict.t b/t/db_dependent/00-strict.t >deleted file mode 100644 >index 688b449..0000000 >--- a/t/db_dependent/00-strict.t >+++ /dev/null >@@ -1,24 +0,0 @@ >-# This script is called by the pre-commit git hook to test modules compile >- >-use strict; >-use warnings; >-use Test::More; >-use Test::Strict; >-use File::Spec; >-use File::Find; >-use lib("misc/translator"); >-use lib("installer"); >- >-my @dirs = ( 'acqui', 'admin', 'authorities', 'basket', >- 'catalogue', 'cataloguing', 'changelanguage.pl', 'circ', 'debian', 'docs', >- 'edithelp.pl', 'errors', 'fix-perl-path.PL', 'help.pl', 'installer', >- 'koha_perl_deps.pl', 'kohaversion.pl', 'labels', >- 'mainpage.pl', 'Makefile.PL', 'members', 'misc', 'offline_circ', 'opac', >- 'patroncards', 'reports', 'reserve', 'resetversion.pl', 'reviews', >- 'rewrite-config.PL', 'rotating_collections', 'serials', 'services', 'skel', >- 'sms', 'suggestion', 'svc', 'tags', 'tools', 'virtualshelves' ); >- >-$Test::Strict::TEST_STRICT = 0; >-$Test::Strict::TEST_SKIP = [ 'misc/kohalib.pl', 'sms/sms_listen_windows_start.pl', 'misc/plack/koha.psgi' ]; >- >-all_perl_files_ok(@dirs); >diff --git a/t/db_dependent/Auth_with_ldap.t b/t/db_dependent/Auth_with_ldap.t >index 6e20c69..446982c 100755 >--- a/t/db_dependent/Auth_with_ldap.t >+++ b/t/db_dependent/Auth_with_ldap.t >@@ -27,11 +27,8 @@ use C4::Context; > > use Koha::Patrons; > >-my $dbh = C4::Context->dbh; >- >-# Start transaction >-$dbh->{AutoCommit} = 0; >-$dbh->{RaiseError} = 1; >+my $schema = Koha::Database->new->schema; >+$schema->storage->txn_begin; > > my $builder = t::lib::TestBuilder->new(); > >@@ -118,6 +115,7 @@ subtest 'checkpw_ldap tests' => sub { > > plan tests => 4; > >+ my $dbh = C4::Context->dbh; > ## Connection fail tests > $desired_connection_result = 'error'; > warning_is { >@@ -508,6 +506,6 @@ sub reload_ldap_module { > return; > } > >-$dbh->rollback; >+$schema->storage->txn_rollback; > > 1; >-- >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 17637
:
57522
|
57538
|
57544