Add test for 'bucardo upgrade'
authorJoshua Tolley <josh@endpoint.com>
Thu, 27 Mar 2014 21:01:09 +0000 (15:01 -0600)
committerJoshua Tolley <josh@endpoint.com>
Thu, 27 Mar 2014 21:01:09 +0000 (15:01 -0600)
t/02-bctl-db.t

index 9c40662cd994616ed48dc83a5311c6ca0f8cd4eb..3ffd7133949e5b0cf5ddbaa222aef00df3cb5fcb 100644 (file)
@@ -10,7 +10,7 @@ use warnings;
 use Data::Dumper;
 use lib 't','.';
 use DBD::Pg;
-use Test::More tests => 48;
+use Test::More tests => 49;
 
 use vars qw/$t $res $command $dbhX $dbhA $dbhB/;
 
@@ -68,6 +68,10 @@ $t = 'Add database works for cluster A';
 $res = $bct->ctl("bucardo add db A dbname=bucardo_test user=$dbuserA port=$dbportA host=$dbhostA");
 is ($res, qq{Added database "A"\n}, $t);
 
+$t = 'Upgrade correctly reports no schema changes are needed';
+$res = $bct->ctl("bucardo upgrade");
+like ($res, qr/No schema changes were needed/, $t);
+
 $t = q{Add database fails if using the same internal name};
 $res = $bct->ctl("bucardo add db A dbname=postgres user=$dbuserA port=$dbportA host=$dbhostA");
 like ($res, qr/Cannot add database: the name "A" already exists/, $t);