diff options
author | Russ Allbery <rra@stanford.edu> | 2008-01-23 03:33:41 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2008-01-23 03:33:41 +0000 |
commit | 77b6875f95aa54fe9c648ba114e06d85cf655bb1 (patch) | |
tree | 27a3ce2238ed38894e68ef7242a3b2a71c5e6cdc /perl/t/keytab.t | |
parent | d94cac7f73b8a0c0a067bc179747426726ab8c31 (diff) |
Refactor database initialization into a new Wallet::Admin module.
Diffstat (limited to 'perl/t/keytab.t')
-rwxr-xr-x | perl/t/keytab.t | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/perl/t/keytab.t b/perl/t/keytab.t index bb6b048..a40332a 100755 --- a/perl/t/keytab.t +++ b/perl/t/keytab.t @@ -11,9 +11,9 @@ use POSIX qw(strftime); use Test::More tests => 223; +use Wallet::Admin; use Wallet::Config; use Wallet::Object::Keytab; -use Wallet::Server; use lib 't/lib'; use Util; @@ -187,13 +187,13 @@ sub stop_remctld { kill 15, $pid; } -# Use Wallet::Server to set up the database. +# Use Wallet::Admin to set up the database. unlink ('krb5cc_temp', 'krb5cc_test', 'test-acl', 'test-pid'); 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'); -my $dbh = $server->dbh; +my $admin = eval { Wallet::Admin->new }; +is ($@, '', 'Database connection succeeded'); +is ($admin->reinitialize ($user), 1, 'Database initialization succeeded'); +my $dbh = $admin->dbh; # Use this to accumulate the history traces so that we can check history. my $history = ''; |