[Bps-public-commit] r11608 - in SVN-PropDB: . lib/Prophet t

jesse at bestpractical.com jesse at bestpractical.com
Mon Apr 7 00:46:31 EDT 2008


Author: jesse
Date: Mon Apr  7 00:46:28 2008
New Revision: 11608

Modified:
   SVN-PropDB/   (props changed)
   SVN-PropDB/lib/Prophet/CLI.pm
   SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm
   SVN-PropDB/lib/Prophet/Replica/RT.pm
   SVN-PropDB/t/sd-hm.t
   SVN-PropDB/t/sd-rt-hm.t

Log:
 r29425 at 57:  jesse | 2008-04-06 18:46:09 -1000
 * more cleanup toward getting the tests to run without screaming


Modified: SVN-PropDB/lib/Prophet/CLI.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/CLI.pm	(original)
+++ SVN-PropDB/lib/Prophet/CLI.pm	Mon Apr  7 00:46:28 2008
@@ -325,6 +325,7 @@
             ( $opts->{'prefer'} eq 'from' ? ( resolver_class => 'Prophet::Resolver::AlwaysSource' ) : () )
         )
     );
+}
 
     sub fatal_error {
         my $reason = shift;
@@ -332,6 +333,5 @@
 
     }
 
-}
 
 1;

Modified: SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm	(original)
+++ SVN-PropDB/lib/Prophet/Replica/Hiveminder.pm	Mon Apr  7 00:46:28 2008
@@ -156,7 +156,6 @@
 
     # Build up a ticket object out of all the record's attributes
 
-    warn Dumper($change); use Data::Dumper;
     my $task = $self->hm->create(
         'Task',
         owner        => 'me',

Modified: SVN-PropDB/lib/Prophet/Replica/RT.pm
==============================================================================
--- SVN-PropDB/lib/Prophet/Replica/RT.pm	(original)
+++ SVN-PropDB/lib/Prophet/Replica/RT.pm	Mon Apr  7 00:46:28 2008
@@ -220,7 +220,8 @@
             $id = $self->integrate_ticket_update( $change, $changeset );
 
         } else {
-            die "AAAAAH I DO NOT KNOW HOW TO PUSH " . YAML::Dump($change);
+            require YAML::Syck;
+            die "AAAAAH I DO NOT KNOW HOW TO PUSH " . YAML::Syck::Dump($change);
         }
 
         $self->record_pushed_transactions( ticket => $id, changeset => $changeset );

Modified: SVN-PropDB/t/sd-hm.t
==============================================================================
--- SVN-PropDB/t/sd-hm.t	(original)
+++ SVN-PropDB/t/sd-hm.t	Mon Apr  7 00:46:28 2008
@@ -57,7 +57,6 @@
 
 
 ($ret, $out, $err) = run_script('sd', ['ticket', '--show', '--uuid', $flyman_uuid]);
-diag $out;
 
 
 run_output_matches('sd', ['ticket', '--create', '--summary', 'YATTA', '--status', 'new'], [qr/Created ticket (.*)(?{ $yatta_uuid = $1 })/]);

Modified: SVN-PropDB/t/sd-rt-hm.t
==============================================================================
--- SVN-PropDB/t/sd-rt-hm.t	(original)
+++ SVN-PropDB/t/sd-rt-hm.t	Mon Apr  7 00:46:28 2008
@@ -5,9 +5,11 @@
 # RT_DBA_USER=root RT_DBA_PASSWORD= prove -lv -I/Users/clkao/work/bps/rt-3.7/lib t/sd-rt.t
 use strict;
 
-use Test::More;
+# setup for rt
+use Prophet::Test;
+
 BEGIN {
-eval 'use RT::Test; 1'
+eval 'require RT::Test; 1'
     or plan skip_all => 'requires 3.7 to run tests.'.$@;
 }
 BEGIN {
@@ -19,6 +21,9 @@
     push @INC, File::Spec->catdir(Jifty::Util->app_root, "lib");
 }
 
+plan tests => 10;
+
+RT::Test->import();
 
 no warnings 'once';
 
@@ -35,11 +40,9 @@
 
 ok(1, "Loaded the test script");
 
-# setup for rt
-use Prophet::Test tests => 10;
 
 my ($url, $m) = RT::Test->started_ok;
-diag $url;
+diag ("RT server started at $url");
 
 use RT::Client::REST;
 use RT::Client::REST::Ticket;
@@ -78,7 +81,7 @@
 as_alice {
     local $ENV{SVB_REPO} = $ENV{'PROPHET_REPO'};
     ($ret, $out, $err) = run_script('sd', ['pull', $sd_hm_url]);
-    warn $err;
+    diag($err) if ($err);
     run_output_matches('sd', ['ticket', '--list', '--regex', '.'], [qr/(.*?)(?{ $yatta_uuid = $1 }) YATTA .*/]);
 };
 
@@ -86,7 +89,7 @@
     local $ENV{SVB_REPO} = $ENV{'PROPHET_REPO'};
     run_output_matches('sd', ['ticket', '--list', '--regex', '.'], []);
     ($ret, $out, $err) = run_script('sd', ['pull', $sd_rt_url]);
-    warn $err;
+    diag($err) if ($err);
     run_output_matches('sd', ['ticket', '--list', '--regex', '.'], [qr/(.*?)(?{ $flyman_uuid = $1 }) Fly Man new/]);
 
 
@@ -98,7 +101,7 @@
                        ]);
 
     ($ret, $out, $err) = run_script('sd', ['push', $sd_rt_url]);
-    warn $out;
+    diag($err) if ($err);
     # XXX: to check YATTA ticket created in RT.
 };
 



More information about the Bps-public-commit mailing list