From c9948c8f68b11a1e897afe9c9f2dd2fcb6934f8d Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sat, 1 Dec 2007 00:42:46 +0000 Subject: 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. --- perl/t/object.t | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'perl/t/object.t') diff --git a/perl/t/object.t b/perl/t/object.t index 42700d0..3591885 100755 --- a/perl/t/object.t +++ b/perl/t/object.t @@ -16,10 +16,8 @@ use Wallet::Config; use Wallet::Object::Base; 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; # Some global defaults to use. my $user = 'admin@EXAMPLE.COM'; @@ -28,6 +26,7 @@ my @trace = ($user, $host, time); my $princ = 'service/test@EXAMPLE.COM'; # Use Wallet::Server to set up the database. +db_setup; my $server = eval { Wallet::Server->reinitialize ($user) }; is ($@, '', 'Database initialization did not die'); ok ($server->isa ('Wallet::Server'), ' and returned the right class'); -- cgit v1.2.3