[Bps-public-commit] SD branch, master, updated. 7753d74636de3681c639debf49edd9c92682f3f8
jesse
jesse at bestpractical.com
Mon Jul 13 21:42:33 EDT 2009
The branch, master has been updated
via 7753d74636de3681c639debf49edd9c92682f3f8 (commit)
from 21696337a9ef28e6dd5e2ec519bc2508f25d870b (commit)
Summary of changes:
lib/App/SD/Replica/hm/PullEncoder.pm | 5 ++++-
t/sd-hm/basics.t | 8 ++++----
t/sd-hm/group.t | 8 ++++----
t/sd-hm/tag.t | 8 ++++----
4 files changed, 16 insertions(+), 13 deletions(-)
- Log -----------------------------------------------------------------
commit 7753d74636de3681c639debf49edd9c92682f3f8
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Mon Jul 13 21:40:40 2009 -0400
Actually correctly translate Hiveminder's binary complete/incomplete state to an SD status
Pointed out by kolibrie++
diff --git a/lib/App/SD/Replica/hm/PullEncoder.pm b/lib/App/SD/Replica/hm/PullEncoder.pm
index 837b432..b324ce4 100644
--- a/lib/App/SD/Replica/hm/PullEncoder.pm
+++ b/lib/App/SD/Replica/hm/PullEncoder.pm
@@ -224,7 +224,10 @@ sub translate_ticket_state {
my $props = shift;
- return $props, {%$props};
+ my $translated = {%$props};
+ $translated->{status} = (delete $translated->{complete}) ? 'closed' : 'open';
+
+ return $props, $translated;
}
__PACKAGE__->meta->make_immutable;
diff --git a/t/sd-hm/basics.t b/t/sd-hm/basics.t
index bbdab97..14d551f 100644
--- a/t/sd-hm/basics.t
+++ b/t/sd-hm/basics.t
@@ -54,7 +54,7 @@ $task->set_summary('Crash Man');
( $ret, $out, $err ) = run_script( 'sd', [ 'pull', '--from', $sd_hm_url ] );
-run_output_matches_unordered( 'sd', [ 'ticket', 'list', '--regex', '.' ], ["$flyman_uuid Crash Man -"] );
+run_output_matches_unordered( 'sd', [ 'ticket', 'list', '--regex', '.' ], ["$flyman_uuid Crash Man open"] );
( $ret, $out, $err ) = run_script( 'sd', [ 'ticket', 'show', '--batch', '--id', $flyman_uuid ] );
@@ -69,7 +69,7 @@ run_output_matches_unordered(
[ 'ticket', 'list', '--regex', '.' ],
[ sort
"$yatta_id YATTA new",
- "$flyman_id Crash Man -"
+ "$flyman_id Crash Man open"
]
);
@@ -83,7 +83,7 @@ ok( $task->load_by_cols( summary => 'YATTA' ) );
run_output_matches_unordered(
'sd',
[ 'ticket', 'list', '--regex', '.' ],
- [ sort "$yatta_id YATTA new", "$flyman_id Crash Man -" ]
+ [ sort "$yatta_id YATTA new", "$flyman_id Crash Man open" ]
);
diag("We did one pull from hm just fine");
$task->set_summary('KILL');
@@ -94,5 +94,5 @@ diag("pulling from hiveminder a second time");
run_output_matches_unordered(
'sd',
[ 'ticket', 'list', '--regex', '.' ],
- [ sort "$yatta_id KILL new", "$flyman_id Crash Man -" ]
+ [ sort "$yatta_id KILL new", "$flyman_id Crash Man open" ]
);
diff --git a/t/sd-hm/group.t b/t/sd-hm/group.t
index eff5d8b..c163afd 100644
--- a/t/sd-hm/group.t
+++ b/t/sd-hm/group.t
@@ -82,7 +82,7 @@ my ($flyman_uuid, $flyman_id );
{
$task->set_summary('Crash Man');
( $ret, $out, $err ) = run_script( 'sd', [ 'pull', '--from', $sd_hm_url ] );
- run_output_matches_unordered( 'sd', [ 'ticket', 'list', '--regex', '.' ], ["$flyman_uuid Crash Man -"] );
+ run_output_matches_unordered( 'sd', [ 'ticket', 'list', '--regex', '.' ], ["$flyman_uuid Crash Man open"] );
}
@@ -90,7 +90,7 @@ my ($yatta_id, $yatta_uuid) = create_ticket_ok( '--summary', 'YATTA', '--status'
run_output_matches_unordered(
'sd', [ qw(ticket list --regex .) ],
- [ "$yatta_id YATTA new", "$flyman_id Crash Man -" ]
+ [ "$yatta_id YATTA new", "$flyman_id Crash Man open" ]
);
{
@@ -103,7 +103,7 @@ run_output_matches_unordered(
my ( $ret, $out, $err ) = run_script( 'sd', [ 'pull', '--from', $sd_hm_url ] );
run_output_matches_unordered(
'sd', [ qw(ticket list --regex .) ],
- [ "$yatta_id YATTA new", "$flyman_id Crash Man -" ]
+ [ "$yatta_id YATTA new", "$flyman_id Crash Man open" ]
);
}
@@ -112,7 +112,7 @@ run_output_matches_unordered(
my ($ret, $out, $err) = run_script( 'sd', [ 'pull', '--from', $sd_hm_url ] );
run_output_matches_unordered(
'sd', [ qw(ticket list --regex .) ],
- [ "$yatta_id KILL new", "$flyman_id Crash Man -" ]
+ [ "$yatta_id KILL new", "$flyman_id Crash Man open" ]
);
}
diff --git a/t/sd-hm/tag.t b/t/sd-hm/tag.t
index ceba4d3..272fa68 100644
--- a/t/sd-hm/tag.t
+++ b/t/sd-hm/tag.t
@@ -69,7 +69,7 @@ my ($flyman_uuid, $flyman_id );
{
$task->set_summary('Crash Man');
( $ret, $out, $err ) = run_script( 'sd', [ 'pull', '--from', $sd_hm_url ] );
- run_output_matches_unordered( 'sd', [ 'ticket', 'list', '--regex', '.' ], ["$flyman_uuid Crash Man -"] );
+ run_output_matches_unordered( 'sd', [ 'ticket', 'list', '--regex', '.' ], ["$flyman_uuid Crash Man open"] );
}
@@ -79,7 +79,7 @@ diag $yatta_uuid;
run_output_matches_unordered(
'sd',
[ 'ticket', 'list', '--regex', '.' ],
- [ "$yatta_id YATTA new", "$flyman_id Crash Man -" ]
+ [ "$yatta_id YATTA new", "$flyman_id Crash Man open" ]
);
{
@@ -94,7 +94,7 @@ run_output_matches_unordered(
run_output_matches_unordered(
'sd',
[ 'ticket', 'list', '--regex', '.' ],
- [ "$yatta_id YATTA new", "$flyman_id Crash Man -" ]
+ [ "$yatta_id YATTA new", "$flyman_id Crash Man open" ]
);
}
@@ -104,6 +104,6 @@ run_output_matches_unordered(
run_output_matches_unordered(
'sd',
[ 'ticket', 'list', '--regex', '.' ],
- [ "$yatta_id KILL new", "$flyman_id Crash Man -" ]
+ [ "$yatta_id KILL new", "$flyman_id Crash Man open" ]
);
}
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list