[Rt-commit] r13788 - in rt/3.8/trunk: .
spang at bestpractical.com
spang at bestpractical.com
Thu Jul 3 15:38:03 EDT 2008
Author: spang
Date: Thu Jul 3 15:38:02 2008
New Revision: 13788
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/t/shredder/00load.t
rt/3.8/trunk/t/shredder/00skeleton.t
rt/3.8/trunk/t/shredder/01basics.t
rt/3.8/trunk/t/shredder/01ticket.t
rt/3.8/trunk/t/shredder/02group_member.t
rt/3.8/trunk/t/shredder/02queue.t
rt/3.8/trunk/t/shredder/02template.t
rt/3.8/trunk/t/shredder/02user.t
rt/3.8/trunk/t/shredder/03plugin.t
rt/3.8/trunk/t/shredder/03plugin_summary.t
rt/3.8/trunk/t/shredder/03plugin_tickets.t
rt/3.8/trunk/t/shredder/03plugin_users.t
rt/3.8/trunk/t/shredder/utils.pl
Log:
r43591 at loki: spang | 2008-07-03 18:56:53 +0100
make shredder tests use get_relocateable_file from RT::Test
Modified: rt/3.8/trunk/t/shredder/00load.t
==============================================================================
--- rt/3.8/trunk/t/shredder/00load.t (original)
+++ rt/3.8/trunk/t/shredder/00load.t Thu Jul 3 15:38:02 2008
@@ -2,11 +2,11 @@
use warnings;
use File::Spec;
use Test::More tests => 11;
+use RT::Test ();
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
Modified: rt/3.8/trunk/t/shredder/00skeleton.t
==============================================================================
--- rt/3.8/trunk/t/shredder/00skeleton.t (original)
+++ rt/3.8/trunk/t/shredder/00skeleton.t Thu Jul 3 15:38:02 2008
@@ -6,10 +6,10 @@
use Test::More;
use Test::Deep;
use File::Spec;
+use RT::Test ();
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
init_db();
Modified: rt/3.8/trunk/t/shredder/01basics.t
==============================================================================
--- rt/3.8/trunk/t/shredder/01basics.t (original)
+++ rt/3.8/trunk/t/shredder/01basics.t Thu Jul 3 15:38:02 2008
@@ -6,10 +6,10 @@
use Test::More;
use Test::Deep;
use File::Spec;
+require RT::Test;
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
init_db();
Modified: rt/3.8/trunk/t/shredder/01ticket.t
==============================================================================
--- rt/3.8/trunk/t/shredder/01ticket.t (original)
+++ rt/3.8/trunk/t/shredder/01ticket.t Thu Jul 3 15:38:02 2008
@@ -6,13 +6,13 @@
use Test::More;
use Test::Deep;
use File::Spec;
+use RT::Test ();
plan tests => 15;
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
Modified: rt/3.8/trunk/t/shredder/02group_member.t
==============================================================================
--- rt/3.8/trunk/t/shredder/02group_member.t (original)
+++ rt/3.8/trunk/t/shredder/02group_member.t Thu Jul 3 15:38:02 2008
@@ -6,10 +6,10 @@
use Test::More;
use Test::Deep;
use File::Spec;
+use RT::Test ();
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
init_db();
Modified: rt/3.8/trunk/t/shredder/02queue.t
==============================================================================
--- rt/3.8/trunk/t/shredder/02queue.t (original)
+++ rt/3.8/trunk/t/shredder/02queue.t Thu Jul 3 15:38:02 2008
@@ -6,10 +6,10 @@
use Test::More;
use Test::Deep;
use File::Spec;
+use RT::Test ();
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
init_db();
Modified: rt/3.8/trunk/t/shredder/02template.t
==============================================================================
--- rt/3.8/trunk/t/shredder/02template.t (original)
+++ rt/3.8/trunk/t/shredder/02template.t Thu Jul 3 15:38:02 2008
@@ -6,10 +6,10 @@
use Test::More;
use Test::Deep;
use File::Spec;
+use RT::Test ();
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
init_db();
Modified: rt/3.8/trunk/t/shredder/02user.t
==============================================================================
--- rt/3.8/trunk/t/shredder/02user.t (original)
+++ rt/3.8/trunk/t/shredder/02user.t Thu Jul 3 15:38:02 2008
@@ -6,10 +6,10 @@
use Test::More;
use Test::Deep;
use File::Spec;
+use RT::Test ();
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
init_db();
Modified: rt/3.8/trunk/t/shredder/03plugin.t
==============================================================================
--- rt/3.8/trunk/t/shredder/03plugin.t (original)
+++ rt/3.8/trunk/t/shredder/03plugin.t Thu Jul 3 15:38:02 2008
@@ -6,10 +6,10 @@
use Test::More;
use Test::Deep;
use File::Spec;
+use RT::Test ();
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
Modified: rt/3.8/trunk/t/shredder/03plugin_summary.t
==============================================================================
--- rt/3.8/trunk/t/shredder/03plugin_summary.t (original)
+++ rt/3.8/trunk/t/shredder/03plugin_summary.t Thu Jul 3 15:38:02 2008
@@ -6,10 +6,10 @@
use Test::More;
use Test::Deep;
use File::Spec;
+use RT::Test ();
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
Modified: rt/3.8/trunk/t/shredder/03plugin_tickets.t
==============================================================================
--- rt/3.8/trunk/t/shredder/03plugin_tickets.t (original)
+++ rt/3.8/trunk/t/shredder/03plugin_tickets.t Thu Jul 3 15:38:02 2008
@@ -6,10 +6,10 @@
use Test::More;
use Test::Deep;
use File::Spec;
+use RT::Test ();
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
Modified: rt/3.8/trunk/t/shredder/03plugin_users.t
==============================================================================
--- rt/3.8/trunk/t/shredder/03plugin_users.t (original)
+++ rt/3.8/trunk/t/shredder/03plugin_users.t Thu Jul 3 15:38:02 2008
@@ -6,10 +6,10 @@
use Test::More;
use Test::Deep;
use File::Spec;
+use RT::Test ();
BEGIN {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $shredder_utils = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories), "utils.pl");
+ my $shredder_utils = RT::Test::get_relocateable_file('utils.pl',
+ File::Spec->curdir());
require $shredder_utils;
}
Modified: rt/3.8/trunk/t/shredder/utils.pl
==============================================================================
--- rt/3.8/trunk/t/shredder/utils.pl (original)
+++ rt/3.8/trunk/t/shredder/utils.pl Thu Jul 3 15:38:02 2008
@@ -138,10 +138,8 @@
foreach ( qw(Type Host Port Name User Password) ) {
$ENV{ "RT_DB_". uc $_ } = RT->Config->Get("Database$_");
}
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- my $rt_setup_database = File::Spec->catfile(
- File::Spec->catdir(File::Spec->curdir(), $directories, File::Spec->updir(),
- File::Spec->updir(), "sbin"), "rt-setup-database");
+ my $rt_setup_database = RT::Test::get_relocateable_file(
+ 'rt-setup-database', (File::Spec->updir(), File::Spec->updir(), 'sbin'));
my $cmd = "$^X $rt_setup_database --action init";
my ($child_out, $child_in);
@@ -222,9 +220,9 @@
=cut
sub tmpdir {
- (my $volume, my $directories, my $file) = File::Spec->splitpath($0);
- return File::Spec->catdir(Cwd->getcwd(),
- $directories, File::Spec->updir(), qw(data shredder)) }
+ return RT::Test::get_abs_relocateable_dir(File::Spec->updir(),
+ 'data', 'shredder');
+}
=head2 create_tmpdir
More information about the Rt-commit
mailing list