diff options
author | Russ Allbery <rra@stanford.edu> | 2007-08-30 17:51:36 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-08-30 17:51:36 +0000 |
commit | 0ec04f853bd1a436b33ddad0feac10e61c791f39 (patch) | |
tree | 8727c03c060ef028a8f2180030b002c37e021a54 /perl | |
parent | 6d261d9e2b4e95f8d538f47730a25a6d82d34134 (diff) |
Unlink the database before creating it to protect against previous test
failures.
Diffstat (limited to 'perl')
-rwxr-xr-x | perl/t/init.t | 1 | ||||
-rwxr-xr-x | perl/t/object.t | 1 | ||||
-rwxr-xr-x | perl/t/schema.t | 1 |
3 files changed, 3 insertions, 0 deletions
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"; |