[Rt-devel] This is not a release announcement for RT 3.6.0
Todd Chapman
todd at chaka.net
Mon Feb 27 17:47:36 EST 2006
Attached a patch that helps 3.6 pass regression tests in
an enviroment where localhost and por 80 are not where
tests are done. In other words, honor the configuration!
-Todd
-------------- next part --------------
==== Patch <3.6regression> level 1
Source: 6fc35107-3207-0410-b21e-9a2d7f624572:/local/bp/rt/3.5-TESTING:5600
Target: e417ac7c-1bcc-0310-8ffa-8f5827389a85:/rt/branches/3.5-TESTING:4566
(svn://svn.bestpractical.com)
Log:
r5598 at slah001: root | 2006-02-27 16:38:20 -0500
Submitting patches for 3.5.
r5599 at slah001: root | 2006-02-27 17:55:19 -0500
The extra slash confuses standalone.
r5600 at slah001: root | 2006-02-27 18:15:31 -0500
Make tests honor the configuration.
=== html/Ticket/Display.html
==================================================================
--- html/Ticket/Display.html (revision 4566)
+++ html/Ticket/Display.html (patch 3.6regression level 1)
@@ -156,7 +156,7 @@
# resubmission on refresh.
# But we need to store Actions somewhere too, so we don't lose them.
$session{"Actions"} = \@Actions;
- $m->redirect($RT::WebURL."/Ticket/Display.html?id=".$TicketObj->id);
+ $m->redirect($RT::WebURL."Ticket/Display.html?id=".$TicketObj->id);
} else {
@Actions = @{$session{"Actions"} || [] };
delete $session{"Actions"};
=== lib/t/regression/03web_compiliation_errors.t
==================================================================
--- lib/t/regression/03web_compiliation_errors.t (revision 4566)
+++ lib/t/regression/03web_compiliation_errors.t (patch 3.6regression level 1)
@@ -18,7 +18,7 @@
RT::LoadConfig();
# get the top page
-my $url = "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+my $url = $RT::WebURL;
diag "Base URL is '$url'" if $ENV{TEST_VERBOSE};
$agent->get($url);
=== lib/t/regression/18custom_frontpage.t
==================================================================
--- lib/t/regression/18custom_frontpage.t (revision 4566)
+++ lib/t/regression/18custom_frontpage.t (patch 3.6regression level 1)
@@ -9,8 +9,7 @@
}
use Test::WWW::Mechanize;
-$RT::WebPath ||= ''; # Shut up a warning
-use constant BaseURL => "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+use constant BaseURL => $RT::WebURL;
my $user_obj = RT::User->new($RT::SystemUser);
=== lib/t/regression/06mailgateway.t
==================================================================
--- lib/t/regression/06mailgateway.t (revision 4566)
+++ lib/t/regression/06mailgateway.t (patch 3.6regression level 1)
@@ -58,7 +58,7 @@
RT::Init();
use RT::I18N;
no warnings 'once';
-my $url = "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+my $url = $RT::WebURL;
# Make sure that when we call the mailgate wrong, it tempfails
=== lib/t/regression/08web_cf_access.t
==================================================================
--- lib/t/regression/08web_cf_access.t (revision 4566)
+++ lib/t/regression/08web_cf_access.t (patch 3.6regression level 1)
@@ -9,8 +9,7 @@
}
use Test::WWW::Mechanize;
-$RT::WebPath ||= ''; # Shut up a warning
-use constant BaseURL => "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+use constant BaseURL => $RT::WebURL;
use constant ImageFile => $RT::MasonComponentRoot .'/NoAuth/images/bplogo.gif';
use constant ImageFileContent => do {
local $/;
=== lib/t/regression/02basic_web.t
==================================================================
--- lib/t/regression/02basic_web.t (revision 4566)
+++ lib/t/regression/02basic_web.t (patch 3.6regression level 1)
@@ -18,7 +18,7 @@
use RT;
RT::LoadConfig();
# get the top page
-my $url = "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+my $url = $RT::WebURL;
diag $url;
$agent->get($url);
=== lib/t/regression/07acl.t
==================================================================
--- lib/t/regression/07acl.t (revision 4566)
+++ lib/t/regression/07acl.t (patch 3.6regression level 1)
@@ -33,9 +33,9 @@
login($agent, $user_obj);
# Test for absence of Configure and Preferences tabs.
-ok(!$agent->find_link( url => "$RT::WebPath/Admin/",
+ok(!$agent->find_link( url => $RT::WebPath . "/Admin/",
text => 'Configuration'), "No config tab" );
-ok(!$agent->find_link( url => "$RT::WebPath/User/Prefs.html",
+ok(!$agent->find_link( url => $RT::WebPath . "/User/Prefs.html",
text => 'Preferences'), "No prefs pane" );
# Now test for their presence, one at a time. Sleep for a bit after
@@ -47,7 +47,7 @@
$agent->reload;
ok($agent->{'content'} =~ /Logout/i, "Reloaded page successfully");
-ok($agent->find_link( url => "$RT::WebPath/Admin/",
+ok($agent->find_link( url => $RT::WebPath . "/Admin/",
text => 'Configuration'), "Found config tab" );
my ($revokeid,$revokemsg) =$user_obj->PrincipalObj->RevokeRight(Right => 'ShowConfigTab');
ok ($revokeid,$revokemsg);
@@ -55,12 +55,12 @@
ok ($grantid,$grantmsg);
$agent->reload();
ok($agent->{'content'} =~ /Logout/i, "Reloaded page successfully");
-ok($agent->find_link( url => "$RT::WebPath/User/Prefs.html",
+ok($agent->find_link( url => $RT::WebPath . "/User/Prefs.html",
text => 'Preferences'), "Found prefs pane" );
($revokeid,$revokemsg) = $user_obj->PrincipalObj->RevokeRight(Right => 'ModifySelf');
ok ($revokeid,$revokemsg);
# Good. Now load the search page and test Load/Save Search.
-$agent->follow_link( url => "$RT::WebPath/Search/Build.html",
+$agent->follow_link( url => $RT::WebPath . "/Search/Build.html",
text => 'Tickets');
is($agent->{'status'}, 200, "Fetched search builder page");
ok($agent->{'content'} !~ /Load saved search/i, "No search loading box");
@@ -114,10 +114,10 @@
sub login {
my $agent = shift;
- my $url = "http://localhost:" . $RT::WebPort . $RT::WebPath . "/";
+ my $url = $RT::WebURL;
$agent->get($url);
is( $agent->{'status'}, 200,
- "Loaded a page - http://localhost" . $RT::WebPath );
+ "Loaded a page - $url" );
# {{{ test a login
=== lib/t/regression/17custom_search.t
==================================================================
--- lib/t/regression/17custom_search.t (revision 4566)
+++ lib/t/regression/17custom_search.t (patch 3.6regression level 1)
@@ -9,8 +9,7 @@
}
use Test::WWW::Mechanize;
-$RT::WebPath ||= ''; # Shut up a warning
-use constant BaseURL => "http://localhost:".$RT::WebPort.$RT::WebPath."/";
+use constant BaseURL => $RT::WebURL;
# reset preferences for easier test?
==== BEGIN SVK PATCH BLOCK ====
Version: svk 1.06 (linux)
eJyllltvJEcVxxuJlzUoEQTBa+P0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Z5FLTZrBEPiODBP16hyJRDmnuGvHfUEk+jts4+Le7fb//tnaG4
z0Nx/1qcfumLFXcVljBHtFMIG6GCYcx75bHT0ZHoCbJ+s3KSbCGp9eArFinYyCLJrLQMMRwRVNrZ
S9t+VH30+sq2//jZTbZd4eF8t9jA6e6sIsRaqoyGa5wS8Bw1Cm9WSC+uDXC6I4Jr5LREXvAQo49S
wJZAjMFAtpT4751/PbxzMs3+8Nvsd7/JztgfH51nZ996os6z02/8+f559v5Xz3/9JNv7ePf32dmv
/klXGUB7Ms938u3xd/1huRhvv7x161Z+8TeoGZbjpe/Xi1geHDfpLH/p7sv59r16WDh4mHfGbud3
X9mqH9z5dgGH86IbTWO58LOqXDy4kx831dUVXUX7or+h3gUgt9cXPVXMUaGk0NRZI6MWEqoeFKLI
BE8V0jfYIt3V4AGKCNbMUcZIxNQiRmC/WQu2osheGvrDn3/43MrQ79//PwydwjrNjFMeugwsmIXj
SSElmdaEas8j06kLI5z1ecO5VrttZeYI4UmeD51g3ucEITFCZERkjsWEqglB+QhxhLbyvWN7WHZd
uTjIj4aGNLR5rJuc7vCdrYTTm3FywvkE6xVufx5yKFtjcpjVzpMZIPk2H1L3pqoXIXGHpnUjV00w
n1C84v7YPAjgu7Zr83m9AIHdPCydtrTfzlaBaU93xNNrbTolcP+Ri7Z7P3XOk8nbi/JhaFpT3RY9
3HCQ9Bx6WWio4cfxcemHq3Vc1c5UY3s0broxlGK0/9re/pv33li22wUVvYiOcozkiBL4gJMBjSzB
YQTnsJdREMYlmd4l/aYoALeNWQxF/0wUxoUYogSG4VKXboStcyNEIYqK0cAH3FGSKm0UL8T/pmby
eVlNhpz+C2yvBpQ=
==== END SVK PATCH BLOCK ====
More information about the Rt-devel
mailing list