[Rt-commit] rtir branch, 4.0.1-releng, updated. 4.0.0-46-g5816596

Shawn Moore shawn at bestpractical.com
Tue Jul 11 17:00:18 EDT 2017


The branch, 4.0.1-releng has been updated
       via  5816596334ff8dab36c7a5618a038f748d663a7b (commit)
      from  0d8bdeafd35521fd6be433247247d06ecd9d5674 (commit)

Summary of changes:
 t/upgrade/2.6.0-to-current.t | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

- Log -----------------------------------------------------------------
commit 5816596334ff8dab36c7a5618a038f748d663a7b
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Jul 11 16:04:12 2017 -0400

    Wrap RT upgrade to catch warnings
    
    This applies to the new-in-4.4.2 upgrade script which issues an
    important notice for users, but shouldn't trigger the warning test
    failure

diff --git a/t/upgrade/2.6.0-to-current.t b/t/upgrade/2.6.0-to-current.t
index 0836f12..97bfbf7 100644
--- a/t/upgrade/2.6.0-to-current.t
+++ b/t/upgrade/2.6.0-to-current.t
@@ -2,6 +2,7 @@
 
 use strict;
 use warnings;
+use Test::Warn;
 
 BEGIN { unless ( $ENV{RTIR_TEST_UPGRADE} ) {
     require Test::More;
@@ -42,7 +43,16 @@ use RT::IR::Test tests => undef;
             if $RT::VERSION =~ /-/
             && RT::Handle::cmp_version($all_versions[-2], $upgrades[-1]) == 0;
 
-        my ($status, $msg) = RT::IR::Test->apply_upgrade( '../rt/etc/upgrade/', @upgrades);
+        my ($status, $msg);
+        my @expected_warnings;
+
+        push @expected_warnings, qr{Unable to load scrip}
+            if RT::Handle::cmp_version($RT::VERSION, '4.4.1') > 0;
+
+        warnings_like {
+            ($status, $msg) = RT::IR::Test->apply_upgrade( '../rt/etc/upgrade/', @upgrades);
+        } \@expected_warnings;
+
         ok $status, "applied " . scalar(@upgrades) . " RT version upgrades" or diag "error: $msg";
     }
 

-----------------------------------------------------------------------


More information about the rt-commit mailing list