diff options
Diffstat (limited to 'perl/t')
-rwxr-xr-x | perl/t/acl.t | 4 | ||||
-rwxr-xr-x | perl/t/admin.t | 4 | ||||
-rwxr-xr-x | perl/t/duo.t | 6 | ||||
-rwxr-xr-x | perl/t/file.t | 6 | ||||
-rwxr-xr-x | perl/t/init.t | 6 | ||||
-rwxr-xr-x | perl/t/keytab.t | 4 | ||||
-rwxr-xr-x | perl/t/object.t | 6 | ||||
-rwxr-xr-x | perl/t/report.t | 6 | ||||
-rwxr-xr-x | perl/t/server.t | 4 | ||||
-rwxr-xr-x | perl/t/stanford-naming.t | 6 | ||||
-rwxr-xr-x | perl/t/wa-keyring.t | 6 |
11 files changed, 39 insertions, 19 deletions
diff --git a/perl/t/acl.t b/perl/t/acl.t index 7f82259..e633f46 100755 --- a/perl/t/acl.t +++ b/perl/t/acl.t @@ -227,4 +227,6 @@ like ($acl->id, qr{\A[23]\z}, ' and an ID of 2 or 3'); # Clean up. $setup->destroy; -unlink 'wallet-db'; +END { + unlink 'wallet-db'; +} diff --git a/perl/t/admin.t b/perl/t/admin.t index 1bcb85e..41bc33a 100755 --- a/perl/t/admin.t +++ b/perl/t/admin.t @@ -101,4 +101,6 @@ SKIP: { # Clean up. is ($admin->destroy, 1, 'Destruction succeeds'); -unlink 'wallet-db'; +END { + unlink 'wallet-db'; +} diff --git a/perl/t/duo.t b/perl/t/duo.t index 12fee3a..4229afe 100755 --- a/perl/t/duo.t +++ b/perl/t/duo.t @@ -149,9 +149,9 @@ TODO: { # Clean up. $admin->destroy; -undef $admin; -undef $object; -unlink ('wallet-db'); +END { + unlink ('wallet-db'); +} # Done testing. done_testing (); diff --git a/perl/t/file.t b/perl/t/file.t index ac35c44..0aecd9d 100755 --- a/perl/t/file.t +++ b/perl/t/file.t @@ -3,7 +3,7 @@ # Tests for the file object implementation. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2008 +# Copyright 2008, 2014 # The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -145,4 +145,6 @@ is ($object->destroy (@trace), 1, ' but destroying the object succeeds'); # Clean up. $admin->destroy; -unlink ('wallet-db'); +END { + unlink ('wallet-db'); +} diff --git a/perl/t/init.t b/perl/t/init.t index 189a689..b8ec3c9 100755 --- a/perl/t/init.t +++ b/perl/t/init.t @@ -3,7 +3,7 @@ # Tests for database initialization. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2007, 2008 +# Copyright 2007, 2008, 2014 # The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -53,4 +53,6 @@ is ($admin->destroy, 1, 'Destroying the database works'); $acl = eval { Wallet::ACL->new ('ADMIN', $admin->schema) }; like ($@, qr/^cannot search for ACL ADMIN: /, ' and now the database is gone'); -unlink 'wallet-db'; +END { + unlink 'wallet-db'; +} diff --git a/perl/t/keytab.t b/perl/t/keytab.t index 467d1b3..127762a 100755 --- a/perl/t/keytab.t +++ b/perl/t/keytab.t @@ -766,4 +766,6 @@ EOO # Clean up. $admin->destroy; -unlink ('wallet-db', 'krb5cc_temp', 'krb5cc_test', 'test-acl', 'test-pid'); +END { + unlink ('wallet-db', 'krb5cc_temp', 'krb5cc_test', 'test-acl', 'test-pid'); +} diff --git a/perl/t/object.t b/perl/t/object.t index 12443bc..0432a23 100755 --- a/perl/t/object.t +++ b/perl/t/object.t @@ -3,7 +3,7 @@ # Tests for the basic object implementation. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2007, 2008, 2011 +# Copyright 2007, 2008, 2011, 2014 # The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -348,4 +348,6 @@ is ($object->history, $output, ' and the history is correct'); # Clean up. $admin->destroy; -unlink 'wallet-db'; +END { + unlink 'wallet-db'; +} diff --git a/perl/t/report.t b/perl/t/report.t index 4ea9628..9563362 100755 --- a/perl/t/report.t +++ b/perl/t/report.t @@ -3,7 +3,7 @@ # Tests for the wallet reporting interface. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2008, 2009, 2010 +# Copyright 2008, 2009, 2010, 2014 # The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -324,5 +324,7 @@ is ($report->error, undef, ' and no error'); # Clean up. $admin->destroy; -unlink 'wallet-db'; system ('rm -r test-files') == 0 or die "cannot remove test-files\n"; +END { + unlink 'wallet-db'; +} diff --git a/perl/t/server.t b/perl/t/server.t index 0ebdacc..9026439 100755 --- a/perl/t/server.t +++ b/perl/t/server.t @@ -1020,7 +1020,9 @@ is ($server->acl_destroy ('test-naming'), 1, 'Destroying it succeeds'); # Clean up. $setup->destroy; -unlink 'wallet-db'; +END { + unlink 'wallet-db'; +} # Now test handling of some configuration errors. undef $Wallet::Config::DB_DRIVER; diff --git a/perl/t/stanford-naming.t b/perl/t/stanford-naming.t index c512ad0..555086c 100755 --- a/perl/t/stanford-naming.t +++ b/perl/t/stanford-naming.t @@ -7,7 +7,7 @@ # behavior at Stanford. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2013 +# Copyright 2013, 2014 # The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -255,4 +255,6 @@ for my $type (qw(htpasswd ssh-rsa ssh-dsa ssl-key tivoli-key)) { # Clean up. $setup->destroy; -unlink 'wallet-db'; +END { + unlink 'wallet-db'; +} diff --git a/perl/t/wa-keyring.t b/perl/t/wa-keyring.t index eaae034..8d8e1fe 100755 --- a/perl/t/wa-keyring.t +++ b/perl/t/wa-keyring.t @@ -3,7 +3,7 @@ # Tests for the WebAuth keyring object implementation. # # Written by Russ Allbery <eagle@eyrie.org> -# Copyright 2013 +# Copyright 2013, 2014 # The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. @@ -179,4 +179,6 @@ is ($object->destroy (@trace), 1, ' but destroying the object succeeds'); # Clean up. $admin->destroy; -unlink ('wallet-db'); +END { + unlink ('wallet-db'); +} |