[Bps-public-commit] r16759 - in sd/branches/init-and-clone: .
sartak at bestpractical.com
sartak at bestpractical.com
Sat Nov 8 01:27:35 EST 2008
Author: sartak
Date: Sat Nov 8 01:27:35 2008
New Revision: 16759
Modified:
sd/branches/init-and-clone/ (props changed)
sd/branches/init-and-clone/t/sd-rt-hm.t
Log:
r75198 at onn: sartak | 2008-11-08 01:27:28 -0500
We need to have alice and bob share the same database for the merges to work
Modified: sd/branches/init-and-clone/t/sd-rt-hm.t
==============================================================================
--- sd/branches/init-and-clone/t/sd-rt-hm.t (original)
+++ sd/branches/init-and-clone/t/sd-rt-hm.t Sat Nov 8 01:27:35 2008
@@ -78,24 +78,35 @@
my ( $bob_yatta_id, $bob_flyman_id, $flyman_uuid, $yatta_uuid, $alice_yatta_id, $alice_flyman_id );
my ( $ret, $out, $err );
+as_alice {
+ local $ENV{SD_REPO} = $ENV{PROPHET_REPO};
+ ( $ret, $out, $err ) = run_script('sd',['init']);
+ diag($err) if ($err);
+};
+
+as_bob {
+ local $ENV{SD_REPO} = $ENV{PROPHET_REPO};
+ ( $ret, $out, $err ) = run_script( 'sd', [ 'clone', '--from', repo_uri_for('alice') ] );
+ diag($err) if ($err);
+};
+
# now the tests, bob syncs with rt, alice syncs with hm
as_alice {
- local $ENV{SD_REPO} = $ENV{'PROPHET_REPO'};
- ( $ret, $out, $err ) = run_script( 'sd', [ 'clone', '--from', $sd_hm_url ] );
+ local $ENV{SD_REPO} = $ENV{PROPHET_REPO};
+ ( $ret, $out, $err ) = run_script( 'sd', [ 'pull', '--from', $sd_hm_url ] );
diag($err) if ($err);
run_output_matches( 'sd', [ 'ticket', 'list', '--regex', '.' ], [qr/^(.*?)(?{ $alice_yatta_id = $1 }) YATTA .*/] );
$yatta_uuid = get_uuid_for_luid($alice_yatta_id);
};
as_bob {
- local $ENV{SD_REPO} = $ENV{'PROPHET_REPO'};
- run_script('sd',['init']);
+ local $ENV{SD_REPO} = $ENV{PROPHET_REPO};
diag("Bob pulling from RT");
( $ret, $out, $err ) = run_script( 'sd', [ 'pull', '--from', $sd_rt_url ] );
diag($err) if ($err);
run_output_matches( 'sd', [ 'ticket', 'list', '--regex', '.' ], [qr/^(.*?)(?{ $bob_flyman_id = $1 }) Fly Man new/] );
diag("Bob pulling from alice");
- ( $ret, $out, $err ) = run_script( 'sd', [ 'pull', '--from', repo_uri_for('alice'), '--force' ] );
+ ( $ret, $out, $err ) = run_script( 'sd', [ 'pull', '--from', repo_uri_for('alice')] );
$flyman_uuid = get_uuid_for_luid($bob_flyman_id);
my $bob_yatta_id = get_luid_for_uuid($yatta_uuid);
More information about the Bps-public-commit
mailing list