[Bps-public-commit] r11781 - in Prophet/trunk: .

jesse at bestpractical.com jesse at bestpractical.com
Sat Apr 19 15:05:42 EDT 2008


Author: jesse
Date: Sat Apr 19 15:05:37 2008
New Revision: 11781

Added:
   Prophet/trunk/t/sync-change-to-original-source.t
Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/t/simple-push.t

Log:
 r29863 at 31b:  jesse | 2008-04-19 20:40:58 +0200
 * some new failing tests for Native replicas
 


Modified: Prophet/trunk/t/simple-push.t
==============================================================================
--- Prophet/trunk/t/simple-push.t	(original)
+++ Prophet/trunk/t/simple-push.t	Sat Apr 19 15:05:37 2008
@@ -3,7 +3,7 @@
 use warnings;
 use strict;
 
-use Prophet::Test tests => 9;
+use Prophet::Test tests => 12;
 
 as_alice {
     run_ok( 'prophet', [qw(create --type Bug --status new --from alice )], "Created a record as alice" );
@@ -40,6 +40,8 @@
     if ( $stdout =~ /^(.*?)\s/ ) {
         $openbug = $1;
     }
+    is($bob->last_changeset_from_source($alice->uuid) => 0);
+
 };
 
 is_deeply(
@@ -93,7 +95,9 @@
 
     # sync from bob
     diag('Alice syncs from bob');
+    is($alice->last_changeset_from_source($bob->uuid) => 0);
     run_ok( 'prophet', [ 'merge', '--from', repo_uri_for('bob'), '--to', repo_uri_for('alice') ], "Sync ran ok!" );
+    is($alice->last_changeset_from_source($bob->uuid) => $bob->latest_sequence_no);
 };
 
 my $last_id;

Added: Prophet/trunk/t/sync-change-to-original-source.t
==============================================================================
--- (empty file)
+++ Prophet/trunk/t/sync-change-to-original-source.t	Sat Apr 19 15:05:37 2008
@@ -0,0 +1,38 @@
+#!/usr/bin/perl -w
+use strict;
+
+
+BEGIN {
+#$ENV{'PROPHET_REPLICA_TYPE'} = 'prophet';
+};
+
+use Prophet::Test::Arena;
+
+# "This test fails when your replica doesn't properly set original source metadata"
+
+Prophet::Test::Arena->run_from_yaml;
+
+__DATA__
+--- 
+chickens: 
+  - ALICE
+  - BOB
+recipe: 
+  - 
+    - ALICE
+    - create_record
+    - 
+      props: 
+        - --B
+        - charlie
+      result: 10
+  - 
+    - BOB
+    - sync_from_peer
+    - 
+      from: ALICE
+  - 
+    - ALICE
+    - sync_from_peer
+    - 
+      from: BOB



More information about the Bps-public-commit mailing list