[Bps-public-commit] r17049 - in sd/trunk: .
spang at bestpractical.com
spang at bestpractical.com
Fri Nov 28 14:04:02 EST 2008
Author: spang
Date: Fri Nov 28 14:04:02 2008
New Revision: 17049
Modified:
sd/trunk/ (props changed)
sd/trunk/lib/App/SD/Test.pm
Log:
r52805 at loki: spang | 2008-11-28 13:54:14 -0500
the test harness should create a blank config file in general so per-user configs can't clobber tests
Modified: sd/trunk/lib/App/SD/Test.pm
==============================================================================
--- sd/trunk/lib/App/SD/Test.pm (original)
+++ sd/trunk/lib/App/SD/Test.pm Fri Nov 28 14:04:02 2008
@@ -6,15 +6,24 @@
require Prophet::Test;
use Test::More;
use File::Spec;
+use File::Temp ();
use Cwd qw/getcwd/;
use base qw/Exporter/;
our @EXPORT = qw(create_ticket_ok create_ticket_with_editor_ok create_ticket_comment_ok get_uuid_for_luid get_luid_for_uuid get_ticket_info);
-$ENV{'SD_CONFIG'} = 't/prophet_testing.conf';
delete $ENV{'PROPHET_APP_CONFIG'};
$ENV{'EDITOR'} = '/bin/true';
our ($A, $B, $C, $D);
+BEGIN {
+ # create a blank config file so per-user configs don't break tests
+ my $tmp_config = File::Temp->new( UNLINK => 0 );
+ print $tmp_config '';
+ close $tmp_config;
+ print "setting SD_CONFIG to " . $tmp_config->filename . "\n";
+ $ENV{'SD_CONFIG'} = $tmp_config->filename;
+}
+
=head2 create_ticket_ok ARGS
Creates a new ticket, passing ARGS along to the creation command (after the
More information about the Bps-public-commit
mailing list