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

jesse at bestpractical.com jesse at bestpractical.com
Tue Jul 22 16:47:37 EDT 2008


Author: jesse
Date: Tue Jul 22 16:47:36 2008
New Revision: 14396

Modified:
   Prophet/trunk/lib/Prophet/Replica.pm
   Prophet/trunk/t/history.t
   Prophet/trunk/t/resty-server.t

Log:
* Fixed resty server
* disabled warning when you're running in 'force' mode
* fixed 'history' tests to run correctly

Modified: Prophet/trunk/lib/Prophet/Replica.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/Replica.pm	(original)
+++ Prophet/trunk/lib/Prophet/Replica.pm	Tue Jul 22 16:47:36 2008
@@ -425,10 +425,7 @@
     );
 
     if ( $self->db_uuid && $args{for}->db_uuid && $self->db_uuid ne $args{for}->db_uuid ) {
-        if ($args{force}) {
-            warn "WARNING: You are merging two different databases!\n";
-        }
-        else {
+        unless ($args{'force'}) {
             die "You are trying to merge two different databases! This is NOT\n".
             "recommended. If you really want to do this,  add '--force' to\n".
             "your commandline.\n\n"

Modified: Prophet/trunk/t/history.t
==============================================================================
--- Prophet/trunk/t/history.t	(original)
+++ Prophet/trunk/t/history.t	Tue Jul 22 16:47:36 2008
@@ -12,9 +12,10 @@
 package main;
 use warnings;
 use strict;
+use File::Temp qw/tempdir/;
 $ENV{'PROPHET_REPO'} = tempdir( CLEANUP => 0 ) . '/repo-' . $$;
 
-use Prophet::Test tests => 10;
+use Prophet::Test tests => 8;
 use Test::Exception;
 
     my $cli = Prophet::CLI->new();

Modified: Prophet/trunk/t/resty-server.t
==============================================================================
--- Prophet/trunk/t/resty-server.t	(original)
+++ Prophet/trunk/t/resty-server.t	Tue Jul 22 16:47:36 2008
@@ -88,6 +88,6 @@
 is( $ua->status, '404', "No that page doesn't exist" );
 
 package Prophet::TestServer;
-use base qw/Test::HTTP::Server::Simple Prophet::Server::REST/;
+use base qw/Test::HTTP::Server::Simple Prophet::Server/;
 
 1;



More information about the Bps-public-commit mailing list