aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-09-18 23:38:29 +0000
committerRuss Allbery <rra@stanford.edu>2007-09-18 23:38:29 +0000
commite435832256e0ba069b771e9bb350e749600efcd4 (patch)
tree173da5f80bdbf3e808dfb429d791477b4c8cb43d
parentdca2ad830232e2e8f9c577658f38779b66c8383a (diff)
Test that retrieving data from a locked object still works.
-rwxr-xr-xperl/t/object.t9
1 files changed, 6 insertions, 3 deletions
diff --git a/perl/t/object.t b/perl/t/object.t
index 0349f28..73efbb7 100755
--- a/perl/t/object.t
+++ b/perl/t/object.t
@@ -3,7 +3,7 @@
#
# t/object.t -- Tests for the basic object implementation.
-use Test::More tests => 118;
+use Test::More tests => 125;
use Wallet::ACL;
use Wallet::Config;
@@ -154,16 +154,19 @@ if ($object->flag_set ('locked', @trace)) {
is ($object->store ("Some data", @trace), undef, 'Store fails');
is ($object->error, "cannot store keytab:${princ}: object is locked",
' because the object is locked');
-is ($object->owner ('', @trace), undef, ' and owner fails');
+is ($object->owner ('', @trace), undef, ' and setting owner fails');
is ($object->error, "cannot modify keytab:${princ}: object is locked",
' for the same reason');
-is ($object->expires ('', @trace), undef, ' and expires fails');
+is ($object->owner, 1, ' but retrieving the owner works');
+is ($object->expires ('', @trace), undef, ' and setting expires fails');
is ($object->error, "cannot modify keytab:${princ}: object is locked",
' for the same reason');
+is ($object->expires, $now, ' but retrieving expires works');
for my $acl (qw/get store show destroy flags/) {
is ($object->acl ($acl, '', @trace), undef, " and setting $acl ACL fails");
is ($object->error, "cannot modify keytab:${princ}: object is locked",
' for the same reason');
+ is ($object->acl ($acl), 1, " but retrieving $acl ACL works");
}
is ($object->flag_check ('locked'), 1, ' and checking flags works');
@flags = $object->flag_list;