summaryrefslogtreecommitdiff
path: root/perl/t
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2014-07-15 22:57:31 -0700
committerRuss Allbery <rra@stanford.edu>2014-07-15 22:58:47 -0700
commit5d0038202d82c71119fefa9c5bd0f816ae55991c (patch)
treeeabcd4396bfd1e41ca11eb0a107cf12609f8a414 /perl/t
parentee79913831be70fc51c193ea4118a15abb038a67 (diff)
Return the name of the ACL instead of the numeric ID
The owner and getacl commands now return the current name of the ACL instead of its numeric ID, matching the documentation of owner. Change-Id: Ic47aad48bd1454ed4bffff7030b0492d74eee4fa Reviewed-on: https://gerrit.stanford.edu/1559 Reviewed-by: Russ Allbery <rra@stanford.edu> Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'perl/t')
-rwxr-xr-xperl/t/object/base.t12
1 files changed, 6 insertions, 6 deletions
diff --git a/perl/t/object/base.t b/perl/t/object/base.t
index 11f18b7..ee9ff4b 100755
--- a/perl/t/object/base.t
+++ b/perl/t/object/base.t
@@ -70,7 +70,7 @@ if ($object->owner ('ADMIN', @trace)) {
} else {
is ($object->error, '', ' and setting it to ADMIN works');
}
-is ($object->owner, $acl->id, ' at which point it is ADMIN');
+is ($object->owner, $acl->name, ' at which point it is ADMIN');
ok (! $object->owner ('unknown', @trace),
' but setting it to something bogus fails');
is ($object->error, 'ACL unknown not found', ' with the right error');
@@ -128,7 +128,7 @@ for my $type (qw/get store show destroy flags/) {
} else {
is ($object->error, '', ' and setting it to ADMIN (numeric) works');
}
- is ($object->acl ($type), $acl->id, ' at which point it is ADMIN');
+ is ($object->acl ($type), $acl->name, ' at which point it is ADMIN');
ok (! $object->acl ($type, 22, @trace),
' but setting it to something bogus fails');
is ($object->error, 'ACL 22 not found', ' with the right error');
@@ -138,8 +138,8 @@ for my $type (qw/get store show destroy flags/) {
is ($object->error, '', ' and clearing it works');
}
is ($object->acl ($type), undef, ' at which point it is cleared');
- is ($object->acl ($type, $acl->id, @trace), 1,
- ' and setting it again works');
+ is ($object->acl ($type, $acl->name, @trace), 1,
+ ' and setting it again by name works');
}
# Flags.
@@ -189,7 +189,7 @@ is ($object->error, "cannot store keytab:${princ}: object is locked",
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->owner, 1, ' but retrieving the owner works');
+is ($object->owner, 'ADMIN', ' 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');
@@ -198,7 +198,7 @@ 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->acl ($acl), 'ADMIN', " but retrieving $acl ACL works");
}
is ($object->flag_check ('locked'), 1, ' and checking flags works');
@flags = $object->flag_list;