[Rt-commit] [rtir] 02/04: On snapshot tests, drop the database so we don't get modern schema
Shawn Moore
shawn at bestpractical.com
Thu May 12 18:35:13 EDT 2016
This is an automated email from the git hooks/post-receive script.
shawn pushed a commit to branch 3.4/upgrade-test-failures
in repository rtir.
commit a438f90ea034f40c0b7ca6cc2df69a24dd06a328
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Thu May 12 22:30:24 2016 +0000
On snapshot tests, drop the database so we don't get modern schema
Without this, we end up with tables like CustomRoles after importing a
4.1.x era database snapshot, forbidding us from running the RT step
of creating the CustomRoles table.
---
lib/RT/IR/Test.pm.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/RT/IR/Test.pm.in b/lib/RT/IR/Test.pm.in
index db97eb5..037f6ff 100644
--- a/lib/RT/IR/Test.pm.in
+++ b/lib/RT/IR/Test.pm.in
@@ -123,6 +123,11 @@ sub import_snapshot {
push @args, RT->Config->Get('DatabaseName');
my $cmd = $ENV{'RT_TEST_MYSQL_CLIENT'} || 'mysql';
+ # drop the old database (which has a modern schema bringing new
+ # tables and such), then create a fresh one *with no schema*,
+ # which will be populated by the snapshot in the next step
+ RT::Test::__create_database();
+
Test::More::diag("About to run `". join(' ', $cmd, @args) ."`");
open my $fh, "|-", $cmd, @args
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the rt-commit
mailing list