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

sartak at bestpractical.com sartak at bestpractical.com
Sat Aug 9 17:52:15 EDT 2008


Author: sartak
Date: Sat Aug  9 17:52:13 2008
New Revision: 14964

Modified:
   Prophet/trunk/   (props changed)
   Prophet/trunk/lib/Prophet/Test.pm
   Prophet/trunk/t/export.t
   Prophet/trunk/t/real-conflicting-merge.t
   Prophet/trunk/t/resty-server.t

Log:
 r69041 at onn:  sartak | 2008-08-09 17:39:55 -0400
 Some test fixes, not done yet, simple-conflicting-merge is being a butt


Modified: Prophet/trunk/lib/Prophet/Test.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Test.pm	(original)
+++ Prophet/trunk/lib/Prophet/Test.pm	Sat Aug  9 17:52:13 2008
@@ -291,8 +291,6 @@
     local $ENV{'PROPHET_USER'} = $username;
     local $ENV{'PROPHET_REPO'} = repo_path_for($username);
 
-    #  diag("I am $username. My replica id is ".replica_uuid());
-
     my $ret = $coderef->();
 
     $REPLICA_UUIDS{$username} = replica_uuid();

Modified: Prophet/trunk/t/export.t
==============================================================================
--- Prophet/trunk/t/export.t	(original)
+++ Prophet/trunk/t/export.t	Sat Aug  9 17:52:13 2008
@@ -40,8 +40,9 @@
         ['show', '--type', 'Bug', '--uuid', $record_id, '--batch'],
         [
             qr/id: (\d+) \($record_id\)/,
-              'status: stalled',
+              "creator: alice\@" . replica_uuid_for('alice'),
               'from: alice',
+              'status: stalled',
         ],
         'content is correct'
     );

Modified: Prophet/trunk/t/real-conflicting-merge.t
==============================================================================
--- Prophet/trunk/t/real-conflicting-merge.t	(original)
+++ Prophet/trunk/t/real-conflicting-merge.t	Sat Aug  9 17:52:13 2008
@@ -18,7 +18,7 @@
 as_bob {
 
     like(run_command(qw(create --type Dummy -- --ignore yes)), qr/Created Dummy/);
-    like(run_command('merge', '--to', repo_uri_for('bob'), '--from', repo_uri_for('alice'), '--force'), qr/Merge complete/, "Sync ran ok!");
+    like(run_command('merge', '--to', repo_uri_for('bob'), '--from', repo_uri_for('alice'), '--force'), qr/Merged one changeset/, "Sync ran ok!");
 
     # check our local replicas
     my $out = run_command(qw(search --type Bug --regex .));
@@ -34,8 +34,9 @@
         [ 'show', '--type', 'Bug', '--uuid', $record_id, '--batch' ],
         [
         qr/id: (\d+) \($record_id\)/,
-          'status: stalled',
+          'creator: alice@' . replica_uuid_for('alice'),
           'from: alice',
+          'status: stalled',
         ],
         'content is correct'
     );
@@ -49,8 +50,9 @@
         [ 'show', '--type', 'Bug', '--uuid', $record_id, '--batch' ],
         [
             qr/id: (\d+) \($record_id\)/,
-              'status: open',
+              'creator: alice@' . replica_uuid_for('alice'),
               'from: alice',
+              'status: open',
         ],
         'content is correct'
     );

Modified: Prophet/trunk/t/resty-server.t
==============================================================================
--- Prophet/trunk/t/resty-server.t	(original)
+++ Prophet/trunk/t/resty-server.t	Sat Aug  9 17:52:13 2008
@@ -35,7 +35,7 @@
 is( $ua->content, '["Cars"]' );
 
 $ua->get_ok( url( 'records', 'Cars', $uuid . ".json" ) );
-is( $ua->content, '{"wheels":"4","windshields":"1"}' );
+is( $ua->content, '{"creator":"'.$car->default_prop_creator.'","wheels":"4","windshields":"1"}' );
 
 $ua->get( url( 'records', 'Cars', "1234.json" ) );
 is( $ua->status, '404' );
@@ -43,7 +43,7 @@
 $ua->post_ok( url( 'records', 'Cars', $uuid . ".json" ), { wheels => 6 } );
 
 $ua->get_ok( url( 'records', 'Cars', $uuid . ".json" ) );
-is( $ua->content, '{"wheels":"6","windshields":"1"}' );
+is( $ua->content, '{"creator":"'.$car->default_prop_creator.'","wheels":"6","windshields":"1"}' );
 
 $ua->post( url( 'records', 'Cars', "doesnotexist.json" ), { wheels => 6 } );
 is( $ua->status, '404', "Can't update a nonexistant car" );
@@ -60,7 +60,7 @@
 
 my $car2 = Prophet::Record->new( handle => $cli->handle, type => 'Cars' );
 $car2->load( uuid => $new_uuid );
-is_deeply( $car2->get_props, { wheels => 3, seatbelts => 'sure!' }, "The thing we created remotely worked just great" );
+is_deeply( $car2->get_props, { creator => $car2->default_prop_creator, wheels => 3, seatbelts => 'sure!' }, "The thing we created remotely worked just great" );
 
 diag("testing property-level access");
 $ua->get_ok( url( 'records', 'Cars', $uuid, 'wheels' ) );



More information about the Bps-public-commit mailing list