[Bps-public-commit] SD branch, master, updated. 0.70-29-g03af7c8

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Sep 1 23:16:05 EDT 2009


The branch, master has been updated
       via  03af7c80233cbac7f11a8fa3252afb6c67a80dbc (commit)
       via  50e75ff3b8eb57f55ecb263134258ed1efc6fab1 (commit)
      from  74a4b300904e6defe1ae2ac419d05cc9855cad5b (commit)

Summary of changes:
 t/{sd-github => sd-lighthouse}/basic.t |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
 copy t/{sd-github => sd-lighthouse}/basic.t (78%)

- Log -----------------------------------------------------------------
commit 50e75ff3b8eb57f55ecb263134258ed1efc6fab1
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Sep 2 11:14:55 2009 +0800

    add t/sd-lighthouse/basic.t

diff --git a/t/sd-lighthouse/basic.t b/t/sd-lighthouse/basic.t
new file mode 100644
index 0000000..2a1082b
--- /dev/null
+++ b/t/sd-lighthouse/basic.t
@@ -0,0 +1,67 @@
+#!/usr/bin/perl -w
+
+use strict;
+use warnings;
+use Prophet::Test;
+
+BEGIN {
+    plan skip_all => "Tests require Net::Lighthouse"
+      unless eval { require Net::Lighthouse; 1 };
+}
+
+plan tests => 8;
+use App::SD::Test;
+
+BEGIN {
+    require File::Temp;
+    $ENV{'PROPHET_REPO'} = $ENV{'SD_REPO'}
+        = File::Temp::tempdir( CLEANUP => 1 ) . '/_svb';
+    diag "export SD_REPO=" . $ENV{'PROPHET_REPO'} . "\n";
+}
+
+my $sd_lighthouseg_url = 'lighthouse:312fe439f2116f1592fe629c2fc7481a98df0177 at sunnavy/sd';
+
+my ( $ret, $out, $err );
+( $ret, $out, $err ) =
+  run_script( 'sd', [ 'clone', '--from', $sd_lighthouseg_url, '--non-interactive' ] );
+my $first_id;
+
+diag($err) if ($err);
+run_output_matches(
+    'sd',
+    [ 'ticket', 'list', '--regex', 'test for sd' ],
+    [qr/(.*?)(?{ $first_id = $1 }) test for sd/]
+);
+
+( $ret, $out, $err ) =
+  run_script( 'sd', [ 'ticket', 'comments', $first_id ] );
+like( $out, qr/first comment.*second comment/s, 'comments pulled' );
+
+( $ret, $out, $err ) = run_script( 'sd', [ 'pull', '--from', $sd_lighthouseg_url ] );
+diag($err);
+
+run_script( 'sd', [ 'ticket', 'comment', $first_id, '-m', 'comment from sd' ] );
+
+my $yatta_id;
+run_output_matches(
+    'sd',
+    [ 'ticket', 'create', '--', '--summary', 'YATTA', '--status', 'open' ],
+    [qr/Created ticket (\d+)(?{ $yatta_id = $1 })/]
+);
+
+run_output_matches(
+    'sd',
+    [ 'ticket', 'list', '--regex', 'YATTA' ],
+    [qr/(.*?)(?{ $yatta_id = $1 }) YATTA open/]
+);
+
+( $ret, $out, $err ) =
+  run_script( 'sd', [ 'push', '--to', $sd_lighthouseg_url, '--dry-run' ] );
+diag($out);
+diag($err);
+
+like( $out, qr/"content" set to "comment from sd"/, 'comment pushed' );
+like( $out, qr/"summary" set to "YATTA"/, 'ticket yatta pushed' );
+unlike( $out, qr/test for sd/, 'pulled tickets not pushed' );
+unlike( $out, qr/first comment.*second comment/s, 'pulled comments not pushed' );
+

commit 03af7c80233cbac7f11a8fa3252afb6c67a80dbc
Merge: 50e75ff 74a4b30
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Wed Sep 2 11:15:09 2009 +0800

    Merge branch 'master' of code.bestpractical.com:/git/sd


-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list