[Rt-commit] rtir branch, 4.0/failing-upgrade-test, created. 4.0.0-50-gfbf55ad
Shawn Moore
shawn at bestpractical.com
Fri Jun 30 18:02:28 EDT 2017
The branch, 4.0/failing-upgrade-test has been created
at fbf55ad466c749c6a9eec77d01b52a81590059ba (commit)
- Log -----------------------------------------------------------------
commit fbf55ad466c749c6a9eec77d01b52a81590059ba
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Fri Jun 30 22:00:18 2017 +0000
Avoid spurious upgrade warning under 4.4.2
The warning is important for users, but can be ignored for the test.
Ideally we'd provide a way for upgrade scripts to check if they're under
test so they can avoid emitting warnings for users, but we don't have
prior art that I could find.
Fixes: T#187986
diff --git a/t/upgrade/2.6.0-to-current.t b/t/upgrade/2.6.0-to-current.t
index 0836f12..286e2e8 100644
--- a/t/upgrade/2.6.0-to-current.t
+++ b/t/upgrade/2.6.0-to-current.t
@@ -42,6 +42,13 @@ use RT::IR::Test tests => undef;
if $RT::VERSION =~ /-/
&& RT::Handle::cmp_version($all_versions[-2], $upgrades[-1]) == 0;
+ # Avoid spurious warning in 4.4.2 causing the warn test failure
+ my $old_warn = $SIG{__WARN__};
+ local $SIG{__WARN__} = sub {
+ return if $_[0] =~ /Unable to load scrip On TimeWorked Change Update User TimeWorked/;
+ goto $old_warn;
+ };
+
my ($status, $msg) = RT::IR::Test->apply_upgrade( '../rt/etc/upgrade/', @upgrades);
ok $status, "applied " . scalar(@upgrades) . " RT version upgrades" or diag "error: $msg";
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list