1#!/usr/bin/env perl 2# -*-mode:cperl; indent-tabs-mode: nil-*- 3 4## Test adding, dropping, and changing databases via bucardo 5## Tests the main subs: add_database, list_databases, update_database, remove_database 6 7use 5.008003; 8use strict; 9use warnings; 10use Data::Dumper; 11use lib 't','.'; 12use DBD::Pg; 13use Test::More tests => 1; 14 15use vars qw/$t $res $command $dbhX $dbhA $dbhB/; 16 17use BucardoTesting; 18my $bct = BucardoTesting->new({notime=>1}) 19 or BAIL_OUT "Creation of BucardoTesting object failed\n"; 20$location = ''; 21 22## Make sure A and B are started up 23$dbhA = $bct->repopulate_cluster('A'); 24$dbhB = $bct->repopulate_cluster('B'); 25 26## Create a bucardo database, and install Bucardo into it 27$dbhX = $bct->setup_bucardo('A'); 28 29## Grab connection information for each database 30my ($dbuserA,$dbportA,$dbhostA) = $bct->add_db_args('A'); 31my ($dbuserB,$dbportB,$dbhostB) = $bct->add_db_args('B'); 32 33pass('No tests for this yet'); 34 35exit; 36 37END { 38 $bct->stop_bucardo($dbhX); 39 $dbhX and $dbhX->disconnect(); 40 $dbhA and $dbhA->disconnect(); 41 $dbhB and $dbhB->disconnect(); 42} 43