aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-10-10 19:28:54 +0000
committerRuss Allbery <rra@stanford.edu>2007-10-10 19:28:54 +0000
commite4d11b740c11948068731f439c108dee479e63f0 (patch)
treeb0f5ad7139c1e733b139d1420dc2466f175709cb
parentfe078e12717c2ea54f8a3bd2fa454217f9d96fa4 (diff)
Test rollback when attempting to set an invalid enctype.
-rwxr-xr-xperl/t/keytab.t8
1 files changed, 5 insertions, 3 deletions
diff --git a/perl/t/keytab.t b/perl/t/keytab.t
index 0d5cf58..c5e63d0 100755
--- a/perl/t/keytab.t
+++ b/perl/t/keytab.t
@@ -9,7 +9,7 @@
# See LICENSE for licensing terms.
use POSIX qw(strftime);
-use Test::More tests => 195;
+use Test::More tests => 196;
use Wallet::Config;
use Wallet::Object::Keytab;
@@ -640,7 +640,7 @@ EOO
# Tests for enctype restriction.
SKIP: {
- skip 'no keytab configuration', 30 unless -f 't/data/test.keytab';
+ skip 'no keytab configuration', 31 unless -f 't/data/test.keytab';
# Set up our configuration.
$Wallet::Config::KEYTAB_FILE = 't/data/test.keytab';
@@ -661,7 +661,7 @@ SKIP: {
my @enctypes = grep { $_ ne 'UNKNOWN' } enctypes ($keytab);
# No enctypes we recognize?
- skip 'no recognized enctypes', 28 unless @enctypes;
+ skip 'no recognized enctypes', 29 unless @enctypes;
# We can test. Add the enctypes we recognized to the enctypes table so
# that we'll be allowed to use them.
@@ -697,6 +697,8 @@ EOO
'Setting an unrecognized enctype fails');
is ($one->error, 'unknown encryption type foo-bar',
' with the right error message');
+ @values = enctypes ($keytab);
+ is ("@values", "@enctypes", ' and we did rollback properly');
# Now, try testing limiting the enctypes to just one.
SKIP: {