[Rt-commit] rt branch, psgi, updated. rt-3.9.4-196-g398b0f1

Chia-liang Kao clkao at bestpractical.com
Tue Oct 19 10:54:47 EDT 2010


The branch, psgi has been updated
       via  398b0f13065074e31c7f4f83453bdb9c09a2dd17 (commit)
       via  39d99e4b95e8373a4a14907239ce6825248779ad (commit)
       via  27efba75a03887e79efb94bf059a6a2db287966a (commit)
       via  27a2f82a2ae530e0996b621eb85e4fc9334b05ef (commit)
       via  b87263f722e1a2d957b3a43ad7b200772098c991 (commit)
      from  54258ea29cb185fd21abe3330befd17d93b24607 (commit)

Summary of changes:
 lib/RT/Interface/Web.pm         |    2 +-
 lib/RT/Interface/Web/Handler.pm |    7 +++++--
 lib/RT/Test/Web.pm              |    6 +++++-
 t/mail/gnupg-incoming.t         |    4 ++--
 t/web/dashboards.t              |    2 +-
 5 files changed, 14 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit b87263f722e1a2d957b3a43ad7b200772098c991
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Oct 19 23:36:48 2010 +0900

    look for SERVER_NAME to make psgi inline test happier

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index c50c1a7..2dfb325 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -513,7 +513,7 @@ sub Redirect {
         }
 
         # [rt3.fsck.com #12716] Apache recommends use of $SERVER_HOST
-        $uri->host( $ENV{'SERVER_HOST'} || $ENV{'HTTP_HOST'} );
+        $uri->host( $ENV{'SERVER_HOST'} || $ENV{'HTTP_HOST'} || $ENV{'SERVER_NAME'});
         $uri->port( $ENV{'SERVER_PORT'} );
     }
 

commit 27a2f82a2ae530e0996b621eb85e4fc9334b05ef
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Oct 19 23:39:12 2010 +0900

    Avoid doing File::Temp::cleanup after every request when doing inline testing

diff --git a/lib/RT/Interface/Web/Handler.pm b/lib/RT/Interface/Web/Handler.pm
index acd355e..431efa4 100644
--- a/lib/RT/Interface/Web/Handler.pm
+++ b/lib/RT/Interface/Web/Handler.pm
@@ -296,8 +296,11 @@ sub CleanupRequest {
     delete $RT::System->{attributes};
 
     # Explicitly remove any tmpfiles that GPG opened, and close their
-    # filehandles.
-    File::Temp::cleanup;
+    # filehandles.  unless we are doing inline psgi testing, which kills all the tmp file created by tests.
+    File::Temp::cleanup()
+            unless $INC{'Test/WWW/Mechanize/PSGI.pm'};
+
+
 }
 
 

commit 27efba75a03887e79efb94bf059a6a2db287966a
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Oct 19 23:39:34 2010 +0900

    enable stashwarnings middleware for inline server

diff --git a/lib/RT/Test/Web.pm b/lib/RT/Test/Web.pm
index 6302f0a..4cd94e7 100644
--- a/lib/RT/Test/Web.pm
+++ b/lib/RT/Test/Web.pm
@@ -61,7 +61,11 @@ sub new {
 
     if ($class->isa('Test::WWW::Mechanize::PSGI')) {
         require RT::Interface::Web::Handler;
-        push @args, app => RT::Interface::Web::Handler->PSGIApp;
+        my $app = RT::Interface::Web::Handler->PSGIApp;
+        require Plack::Middleware::Test::StashWarnings;
+        $app = Plack::Middleware::Test::StashWarnings->wrap($app);
+
+        push @args, app => $app;
     }
 
     my $self = $class->SUPER::new(@args);

commit 39d99e4b95e8373a4a14907239ce6825248779ad
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Oct 19 23:48:58 2010 +0900

    make gnupg-incoming test actually declare requiring actual servers

diff --git a/t/mail/gnupg-incoming.t b/t/mail/gnupg-incoming.t
index a2843d8..93b67c3 100644
--- a/t/mail/gnupg-incoming.t
+++ b/t/mail/gnupg-incoming.t
@@ -2,12 +2,12 @@
 use strict;
 use warnings;
 
-use RT::Test tests => undef;
+use Test::More;
 plan skip_all => 'GnuPG required.'
     unless eval { require GnuPG::Interface; 1 };
 plan skip_all => 'gpg executable is required.'
     unless RT::Test->find_executable('gpg');
-plan tests => 39, actual_server => 1;
+use RT::Test tests => 39, actual_server => 1;
 
 use File::Temp;
 use Cwd 'getcwd';

commit 398b0f13065074e31c7f4f83453bdb9c09a2dd17
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Tue Oct 19 23:50:10 2010 +0900

    use the right mech for warnings_like

diff --git a/t/web/dashboards.t b/t/web/dashboards.t
index b3fee67..6e875ec 100644
--- a/t/web/dashboards.t
+++ b/t/web/dashboards.t
@@ -259,5 +259,5 @@ $omech->follow_link_ok({text => 'system dashboard'});
 $omech->content_lacks("personal search", "saved search doesn't show up");
 $omech->content_lacks("dashboard test", "matched ticket doesn't show up");
 
-$m->warning_like(qr/User .* tried to load container user /, "can't see other users' personal searches");
+$omech->warning_like(qr/User .* tried to load container user /, "can't see other users' personal searches");
 

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


More information about the Rt-commit mailing list