diff options
author | Russ Allbery <rra@stanford.edu> | 2007-12-01 00:42:46 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-12-01 00:42:46 +0000 |
commit | c9948c8f68b11a1e897afe9c9f2dd2fcb6934f8d (patch) | |
tree | f15323beb5ceac6a2b81df8634f5f9f23ad239c8 /perl/t/server.t | |
parent | 1e13c0c60c96dd1719e7c4c3931b4196c2b5bc61 (diff) |
The wallet backend test suite now supports using a database other than
SQLite for testing.
Also start a new Util.pm module for the test suite and move the contents
sub into that module. More to follow.
Diffstat (limited to 'perl/t/server.t')
-rwxr-xr-x | perl/t/server.t | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/perl/t/server.t b/perl/t/server.t index 2520e62..f7826b6 100755 --- a/perl/t/server.t +++ b/perl/t/server.t @@ -13,10 +13,8 @@ use Test::More tests => 321; use Wallet::Config; 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 lib 't/lib'; +use Util; # Allow creation of base objects for testing purposes. $Wallet::Server::MAPPING{base} = 'Wallet::Object::Base'; @@ -29,6 +27,7 @@ my $host = 'localhost'; my @trace = ($admin, $host); # Use Wallet::Server to set up the database. +db_setup; my $server = eval { Wallet::Server->initialize ($admin) }; is ($@, '', 'Database initialization did not die'); ok ($server->isa ('Wallet::Server'), ' and returned the right class'); |