diff options
| author | Russ Allbery <rra@stanford.edu> | 2013-03-27 15:19:54 -0700 | 
|---|---|---|
| committer | Russ Allbery <rra@stanford.edu> | 2013-03-27 15:19:54 -0700 | 
| commit | 5df16adc5024c56e3d733741919954308b4d498a (patch) | |
| tree | 5f042adaaa988478ca271f41f9b272ef5a1b45b5 /perl/t/lib | |
| parent | 431c3b56a52b9fe3135ab4339bada13ed49bda92 (diff) | |
| parent | 6871bae8e26beadaff5035de56b4f70a78961dc9 (diff) | |
Merge tag 'upstream/1.0' into debian
Upstream version 1.0
Diffstat (limited to 'perl/t/lib')
| -rw-r--r-- | perl/t/lib/Util.pm | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/perl/t/lib/Util.pm b/perl/t/lib/Util.pm index 44a4d21..3e606fe 100644 --- a/perl/t/lib/Util.pm +++ b/perl/t/lib/Util.pm @@ -1,7 +1,8 @@  # Utility class for wallet tests.  #  # Written by Russ Allbery <rra@stanford.edu> -# Copyright 2007, 2008 Board of Trustees, Leland Stanford Jr. University +# Copyright 2007, 2008 +#     The Board of Trustees of the Leland Stanford Junior University  #  # See LICENSE for licensing terms. @@ -45,6 +46,7 @@ sub contents {  # for testing by default, but support t/data/test.database as a configuration  # file to use another database backend.  sub db_setup { +    $Wallet::Config::DB_DDL_DIRECTORY = 'sql/';      if (-f 't/data/test.database') {          open (DB, '<', 't/data/test.database')              or die "cannot open t/data/test.database: $!"; @@ -60,6 +62,10 @@ sub db_setup {          $Wallet::Config::DB_USER = $user if $user;          $Wallet::Config::DB_PASSWORD = $password if $password;      } else { + +        # If we have a new SQLite db by default, disable version checking. +        $ENV{DBIC_NO_VERSION_CHECK} = 1; +          $Wallet::Config::DB_DRIVER = 'SQLite';          $Wallet::Config::DB_INFO = 'wallet-db';          unlink 'wallet-db'; @@ -74,6 +80,7 @@ sub db_setup {  sub getcreds {      my ($file, $principal) = @_;      my @commands = ( +        "kinit --no-afslog -k -t $file $principal >/dev/null 2>&1 </dev/null",          "kinit -k -t $file $principal >/dev/null 2>&1 </dev/null",          "kinit -t $file $principal >/dev/null 2>&1 </dev/null",          "kinit -T /bin/true -k -K $file $principal >/dev/null 2>&1 </dev/null",  | 
