From 0ec04f853bd1a436b33ddad0feac10e61c791f39 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 30 Aug 2007 17:51:36 +0000 Subject: Unlink the database before creating it to protect against previous test failures. --- perl/t/init.t | 1 + perl/t/object.t | 1 + perl/t/schema.t | 1 + 3 files changed, 3 insertions(+) diff --git a/perl/t/init.t b/perl/t/init.t index 8f6d034..89fd3c8 100755 --- a/perl/t/init.t +++ b/perl/t/init.t @@ -13,6 +13,7 @@ use Wallet::Server; # Use a local SQLite database for testing. $Wallet::Config::DB_DRIVER = 'SQLite'; $Wallet::Config::DB_INFO = 'wallet-db'; +unlink 'wallet-db'; # Use Wallet::Server to set up the database. my $server = eval { Wallet::Server->initialize ('admin@EXAMPLE.COM') }; diff --git a/perl/t/object.t b/perl/t/object.t index 878e29d..442f50c 100755 --- a/perl/t/object.t +++ b/perl/t/object.t @@ -14,6 +14,7 @@ use Wallet::Server; # Use a local SQLite database for testing. $Wallet::Config::DB_DRIVER = 'SQLite'; $Wallet::Config::DB_INFO = 'wallet-db'; +unlink 'wallet-db'; # Some global defaults to use. my $user = 'admin@EXAMPLE.COM'; diff --git a/perl/t/schema.t b/perl/t/schema.t index e97dfc6..e326dca 100755 --- a/perl/t/schema.t +++ b/perl/t/schema.t @@ -17,6 +17,7 @@ ok (@sql > 0, 'sql() returns something'); is (scalar (@sql), 22, ' and returns the right number of statements'); # Create a SQLite database to use for create. +unlink 'wallet-db'; my $dbh = DBI->connect ("DBI:SQLite:wallet-db"); if (not defined $dbh) { die "cannot create database wallet-db: $DBI::errstr\n"; -- cgit v1.2.3