[Bps-public-commit] r16695 - in Prophet/branches/init-and-clone: .

jesse at bestpractical.com jesse at bestpractical.com
Thu Nov 6 01:52:27 EST 2008


Author: jesse
Date: Thu Nov  6 01:52:27 2008
New Revision: 16695

Modified:
   Prophet/branches/init-and-clone/   (props changed)
   Prophet/branches/init-and-clone/t/canonicalize.t
   Prophet/branches/init-and-clone/t/cli.t
   Prophet/branches/init-and-clone/t/create.t
   Prophet/branches/init-and-clone/t/database-settings.t
   Prophet/branches/init-and-clone/t/default.t
   Prophet/branches/init-and-clone/t/edit.t
   Prophet/branches/init-and-clone/t/history.t
   Prophet/branches/init-and-clone/t/non-conflicting-merge.t
   Prophet/branches/init-and-clone/t/real-conflicting-merge.t
   Prophet/branches/init-and-clone/t/resty-server.t

Log:
 r49321 at 31b:  jesse | 2008-11-06 04:14:51 +0900
 * Test cleanups


Modified: Prophet/branches/init-and-clone/t/canonicalize.t
==============================================================================
--- Prophet/branches/init-and-clone/t/canonicalize.t	(original)
+++ Prophet/branches/init-and-clone/t/canonicalize.t	Thu Nov  6 01:52:27 2008
@@ -12,6 +12,8 @@
 my $cxn = $cli->handle;
 isa_ok($cxn, 'Prophet::Replica');
 
+$cxn->initialize;
+
 use_ok('TestApp::Bug');
 
 my $record = TestApp::Bug->new( handle => $cxn );

Modified: Prophet/branches/init-and-clone/t/cli.t
==============================================================================
--- Prophet/branches/init-and-clone/t/cli.t	(original)
+++ Prophet/branches/init-and-clone/t/cli.t	Thu Nov  6 01:52:27 2008
@@ -4,6 +4,7 @@
 use Prophet::Test tests => 2;
 
 as_alice {
+    run_command(qw(init));
     like(run_command(qw(create --type Bug -- --status new --from alice)), qr/Created Bug/, "Created a record as alice");
     like(run_command(qw(show 1 --type Bug --batch)), qr/id: 1/, "'show 1' dwims");
 };

Modified: Prophet/branches/init-and-clone/t/create.t
==============================================================================
--- Prophet/branches/init-and-clone/t/create.t	(original)
+++ Prophet/branches/init-and-clone/t/create.t	Thu Nov  6 01:52:27 2008
@@ -10,6 +10,9 @@
 my $cxn = $cli->handle;
 
 isa_ok( $cxn, 'Prophet::Replica', "Got the cxn" );
+
+$cxn->initialize;
+
 use_ok('Prophet::Record');
 my $record = Prophet::Record->new( handle => $cxn, type => 'Person' );
 isa_ok( $record, 'Prophet::Record' );

Modified: Prophet/branches/init-and-clone/t/database-settings.t
==============================================================================
--- Prophet/branches/init-and-clone/t/database-settings.t	(original)
+++ Prophet/branches/init-and-clone/t/database-settings.t	Thu Nov  6 01:52:27 2008
@@ -38,6 +38,7 @@
     $alice_cli = Prophet::CLI->new();
     my $cxn = $alice_cli->handle;
     isa_ok( $cxn, 'Prophet::Replica', "Got the cxn " . $cxn->fs_root );
+    $cxn->initialize();
 
     # set up an app model class, "ticket"
     my $t = MyApp::Model::Task->new(handle => $alice_cli->app_handle->handle);
@@ -89,11 +90,11 @@
     my $cxn = $bob_cli->handle;
     isa_ok( $cxn, 'Prophet::Replica', "Got the cxn " . $cxn->fs_root );
 
+    # pull from alice
+    run_ok( 'prophet', ['clone', '--from', "file://".$alice_cli->app_handle->handle->fs_root] );
     run_ok( 'prophet', [qw(create --type Bug -- --status open --from bob )], "Created a record as bob" );
-    run_output_matches( 'prophet', [qw(search --type Bug --regex .)], [qr/open/], " Found our record" );
+    run_output_matches( 'prophet', [qw(search --type Bug --regex open)], [qr/open/], " Found our record" );
 
-    # pull from alice
-    run_ok( 'prophet', ['pull', '--from', "file://".$alice_cli->app_handle->handle->fs_root, '--force'] );
     
 
     my $t = MyApp::Model::Task->new(handle => $bob_cli->app_handle->handle);

Modified: Prophet/branches/init-and-clone/t/default.t
==============================================================================
--- Prophet/branches/init-and-clone/t/default.t	(original)
+++ Prophet/branches/init-and-clone/t/default.t	Thu Nov  6 01:52:27 2008
@@ -8,6 +8,7 @@
 $ENV{'PROPHET_REPO'} = tempdir( CLEANUP => 0 ) . '/repo-' . $$;
 my $cli = Prophet::CLI->new();
 my $cxn = $cli->handle;
+$cxn->initialize;
 isa_ok($cxn, 'Prophet::Replica');
 
 use_ok('TestApp::Bug');

Modified: Prophet/branches/init-and-clone/t/edit.t
==============================================================================
--- Prophet/branches/init-and-clone/t/edit.t	(original)
+++ Prophet/branches/init-and-clone/t/edit.t	Thu Nov  6 01:52:27 2008
@@ -5,6 +5,7 @@
 
 $ENV{'PROPHET_REPO'} = tempdir( CLEANUP => 0 ) . '/repo-' . $$;
 my $prophet = Prophet::CLI->new;
+$prophet->handle->initialize;
 
 my ($luid,  $uuid);
 my $created_re = qr/Created Robot Master (\d+)(?{ $luid = $1}) \((\S+)(?{ $uuid = $2 })\)/;

Modified: Prophet/branches/init-and-clone/t/history.t
==============================================================================
--- Prophet/branches/init-and-clone/t/history.t	(original)
+++ Prophet/branches/init-and-clone/t/history.t	Thu Nov  6 01:52:27 2008
@@ -19,6 +19,9 @@
 use Test::Exception;
 
     my $cli = Prophet::CLI->new();
+
+$cli->handle->initialize;
+
     my $rec = App::Record::Thingy->new( handle => $cli->handle, type => 'foo' );
 
     ok( $rec->create( props => { foo => 'bar', point => '123' } ) );

Modified: Prophet/branches/init-and-clone/t/non-conflicting-merge.t
==============================================================================
--- Prophet/branches/init-and-clone/t/non-conflicting-merge.t	(original)
+++ Prophet/branches/init-and-clone/t/non-conflicting-merge.t	Thu Nov  6 01:52:27 2008
@@ -3,9 +3,10 @@
 use warnings;
 use strict;
 
-use Prophet::Test tests => 25;
+use Prophet::Test tests => 27;
 
 as_alice {
+    run_ok( 'prophet', ['init']);
     run_ok( 'prophet', [qw(create --type Bug -- --status new --from alice )], "Created a record as alice" );
     run_output_matches( 'prophet', [qw(search --type Bug --regex .)], [qr/new/], " Found our record" );
 
@@ -15,6 +16,7 @@
 };
 
 as_bob {
+    run_ok( 'prophet', [qw(init)]);
     run_ok( 'prophet', [qw(create --type Bug -- --status open --from bob )], "Created a record as bob" );
     run_output_matches( 'prophet', [qw(search --type Bug --regex .)], [qr/open/], " Found our record" );
 

Modified: Prophet/branches/init-and-clone/t/real-conflicting-merge.t
==============================================================================
--- Prophet/branches/init-and-clone/t/real-conflicting-merge.t	(original)
+++ Prophet/branches/init-and-clone/t/real-conflicting-merge.t	Thu Nov  6 01:52:27 2008
@@ -4,9 +4,10 @@
 use strict;
 use Test::Exception;
 
-use Prophet::Test tests => 19;
+use Prophet::Test tests => 21;
 
 as_alice {
+    run_command(qw(init));
     like(run_command(qw(create --type Bug -- --status new --from alice)), qr/Created Bug/, "Created a record as alice");
     like(run_command(qw(search --type Bug --regex .)), qr/new/, "Found our record");
 };
@@ -17,6 +18,7 @@
 
 as_bob {
 
+    run_command(qw(init));
     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/Merged one changeset/, "Sync ran ok!");
 

Modified: Prophet/branches/init-and-clone/t/resty-server.t
==============================================================================
--- Prophet/branches/init-and-clone/t/resty-server.t	(original)
+++ Prophet/branches/init-and-clone/t/resty-server.t	Thu Nov  6 01:52:27 2008
@@ -18,6 +18,8 @@
 my $cli = Prophet::CLI->new();
 my $s   = Prophet::TestServer->new();
 
+$cli->handle()->initialize;
+
 $s->app_handle( $cli->app_handle );
 
 my $url_root = $s->started_ok("start up my web server");



More information about the Bps-public-commit mailing list