[Rt-commit] rtir branch, 4.0/catch-upgrade-test-warning, updated. 4.0.0-49-g7809654

Jim Brandt jbrandt at bestpractical.com
Tue Jul 11 16:04:20 EDT 2017


The branch, 4.0/catch-upgrade-test-warning has been updated
       via  78096541087930705f5f5e2d412d54fc8ec9d28a (commit)
      from  fdf0c5f0cdd7ad4bf1a3c86e8b6d2bb9ebf6f2c6 (commit)

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

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

    Wrap RT upgrade to catch warnings

diff --git a/t/upgrade/2.6.0-to-current.t b/t/upgrade/2.6.0-to-current.t
index 0836f12..de498cb 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,11 @@ 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);
+        warnings_like {
+            ($status, $msg) = RT::IR::Test->apply_upgrade( '../rt/etc/upgrade/', @upgrades);
+        } [ qr{Unable to load scrip} ];
+
         ok $status, "applied " . scalar(@upgrades) . " RT version upgrades" or diag "error: $msg";
     }
 

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


More information about the rt-commit mailing list