[Bps-public-commit] r16748 - in sd/branches/init-and-clone: .

sartak at bestpractical.com sartak at bestpractical.com
Fri Nov 7 23:38:27 EST 2008


Author: sartak
Date: Fri Nov  7 23:38:27 2008
New Revision: 16748

Modified:
   sd/branches/init-and-clone/   (props changed)
   sd/branches/init-and-clone/t/sd-rt-n-foreign-sync.t

Log:
 r75176 at onn:  sartak | 2008-11-07 23:38:20 -0500
 Avoid conflicts in syncing DatabaseSettings by having bob make a clone of alice's replica


Modified: sd/branches/init-and-clone/t/sd-rt-n-foreign-sync.t
==============================================================================
--- sd/branches/init-and-clone/t/sd-rt-n-foreign-sync.t	(original)
+++ sd/branches/init-and-clone/t/sd-rt-n-foreign-sync.t	Fri Nov  7 23:38:27 2008
@@ -96,12 +96,23 @@
 my ( $bob_yatta_id, $bob_flyman_id, $flyman_uuid, $yatta_uuid, $alice_yatta_id, $alice_flyman_id );
 my ( $ret, $out, $err );
 
-# now the tests, bob syncs with rt, alice syncs with hm
+# start with the same database
 as_alice {
     local $ENV{SD_REPO} = $ENV{'PROPHET_REPO'};
 
     run_script( 'sd', [ 'init']);
-    
+};
+
+as_bob {
+    local $ENV{SD_REPO} = $ENV{'PROPHET_REPO'};
+
+    ( $ret, $out, $err ) = run_script( 'sd', [ 'clone', '--from', repo_uri_for('alice') ] );
+};
+
+# 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', [ 'pull', '--from', $sd_hm_url ] );
     diag($err) if ($err);
     run_output_matches( 'sd', [ 'ticket', 'list', '--regex', '.' ], [qr/^(.*?)(?{ $alice_yatta_id = $1 }) YATTA .*/] );
@@ -110,8 +121,7 @@
 
 as_bob {
     local $ENV{SD_REPO} = $ENV{'PROPHET_REPO'};
-    run_script( 'sd', [ 'init']);
-    
+
     run_output_matches( 'sd', [ 'ticket', 'list', '--regex', '.' ], [] );
 
     diag("Bob pulling from RT");



More information about the Bps-public-commit mailing list