[Rt-commit] r5088 - in rt/branches/3.7-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Tue Apr 25 08:45:09 EDT 2006


Author: ruz
Date: Tue Apr 25 08:45:04 2006
New Revision: 5088

Modified:
   rt/branches/3.7-EXPERIMENTAL/   (props changed)
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/02basic_web.t
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/03web_compiliation_errors.t
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/06mailgateway.t
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/07acl.t
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/08web_cf_access.t
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/17custom_search.t
   rt/branches/3.7-EXPERIMENTAL/lib/t/regression/18custom_frontpage.t

Log:
 r2166 at cubic-pc (orig r4752):  kevinr | 2006-03-14 05:47:52 +0300
  r11458 at SAD-GIRL-IN-SNOW:  kevinr | 2006-03-13 19:28:36 -0500
  * Applied patch from Todd Chapman to make the RT 3.5 test-suite obey the
  configuration directives for server and port, so you don't have to be
  testing on localhost and port 80.
 


Modified: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/02basic_web.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/t/regression/02basic_web.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/02basic_web.t	Tue Apr 25 08:45:04 2006
@@ -18,7 +18,7 @@
 use RT;
 RT::LoadConfig();
 # get the top page
-my $url = "http://localhost:".RT->Config->Get('WebPort').RT->Config->Get('WebPath')."/";
+my $url = RT->Config->Get('WebURL');
 diag $url;
 $agent->get($url);
 

Modified: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/03web_compiliation_errors.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/t/regression/03web_compiliation_errors.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/03web_compiliation_errors.t	Tue Apr 25 08:45:04 2006
@@ -18,7 +18,7 @@
 RT::LoadConfig();
 
 # get the top page
-my $url = "http://localhost:". RT->Config->Get('WebPort') . RT->Config->Get('WebPath') ."/";
+my $url = RT->Config->Get('WebURL');
 diag "Base URL is '$url'" if $ENV{TEST_VERBOSE};
 $agent->get($url);
 

Modified: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/06mailgateway.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/t/regression/06mailgateway.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/06mailgateway.t	Tue Apr 25 08:45:04 2006
@@ -58,7 +58,7 @@
 RT::Init();
 use RT::I18N;
 no warnings 'once';
-my $url = "http://localhost:".RT->Config->Get('WebPort').RT->Config->Get('WebPath')."/";
+my $url = RT->Config->Get('WebURL');
 
 # Make sure that when we call the mailgate wrong, it tempfails
 

Modified: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/07acl.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/t/regression/07acl.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/07acl.t	Tue Apr 25 08:45:04 2006
@@ -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->Config->Get('WebPath') . "/Admin/",
 		       text => 'Configuration'), "No config tab" );
-ok(!$agent->find_link( url => "$RT::WebPath/User/Prefs.html",
+ok(!$agent->find_link( url => RT->Config->Get('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->Config->Get('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->Config->Get('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->Config->Get('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->Config->Get('WebPort') . RT->Config->Get('WebPath') . "/";
+    my $url = RT->Config->Get('WebURL');
     $agent->get($url);
     is( $agent->{'status'}, 200,
-        "Loaded a page - http://localhost" . RT->Config->Get('WebPath') );
+        "Loaded a page - $url" );
 
     # {{{ test a login
 

Modified: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/08web_cf_access.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/t/regression/08web_cf_access.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/08web_cf_access.t	Tue Apr 25 08:45:04 2006
@@ -9,7 +9,7 @@
 }
 use Test::WWW::Mechanize;
 
-use constant BaseURL => "http://localhost:".RT->Config->Get('WebPort').RT->Config->Get('WebPath')."/";
+use constant BaseURL => RT->Config->Get('WebURL');
 use constant ImageFile => $RT::MasonComponentRoot .'/NoAuth/images/bplogo.gif';
 use constant ImageFileContent => do {
     local $/;

Modified: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/17custom_search.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/t/regression/17custom_search.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/17custom_search.t	Tue Apr 25 08:45:04 2006
@@ -9,7 +9,7 @@
 }
 use Test::WWW::Mechanize;
 
-use constant BaseURL => "http://localhost:".RT->Config->Get('WebPort').RT->Config->Get('WebPath')."/";
+use constant BaseURL => RT->Config->Get('WebURL');
 
 # reset preferences for easier test?
 

Modified: rt/branches/3.7-EXPERIMENTAL/lib/t/regression/18custom_frontpage.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/t/regression/18custom_frontpage.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/t/regression/18custom_frontpage.t	Tue Apr 25 08:45:04 2006
@@ -9,8 +9,7 @@
 }
 use Test::WWW::Mechanize;
 
-use constant BaseURL => "http://localhost:".RT->Config->Get('WebPort').RT->Config->Get('WebPath')."/";
-
+use constant BaseURL => RT->Config->Get('WebURL');
 
 my $user_obj = RT::User->new($RT::SystemUser);
 my ($ret, $msg) = $user_obj->LoadOrCreateByEmail('customer at example.com');


More information about the Rt-commit mailing list