use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/lib";
use lib "$FindBin::Bin/../lib";
use Test::CouchDB;
use Net::CouchDB;

my $couch = Net::CouchDB->new( $ENV{NET_COUCHDB_URI} );
for my $db ( $couch->all_dbs ) {
    next if $db->name !~ m/^net-couchdb-\d+-\d+$/;
    warn "Deleting " . $db->name . "\n";
    $db->delete;
}

Create a script for cleaning up after the tests
Create a script for cleaning up after the tests

In some debugging cases, the tests don't clean up after themselves the
way that they should.  Running this script deletes all databases that
were created by the test suite.

Signed-off-by: Michael Hendricks <17b9e1c64588c7fa6419b4d29dc1f4426279ba01@ndrix.org>
