aboutsummaryrefslogtreecommitdiff
path: root/perl/t
diff options
context:
space:
mode:
authorJon Robertson <jonrober@stanford.edu>2015-06-09 15:04:14 -0700
committerJon Robertson <jonrober@stanford.edu>2015-11-18 23:47:40 -0800
commit5d668b86ced32e84fd0f49046326a0a5e20dc8eb (patch)
tree29f57641512d39186f398a5e8e1fbb7a0a127b7e /perl/t
parent43f386a6e3d0c141cd732b5ef5c2be8349f51f03 (diff)
Added wallet report for nested ACL
We needed a way to report on where all a specific ACL might be nested, since we can't destroy an ACL until it's no longer being nested. For the immediate this is part of wallet-report. Change-Id: I41c11b73325d1eb3a28289eac3505bf965877be1
Diffstat (limited to 'perl/t')
-rwxr-xr-xperl/t/general/report.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/perl/t/general/report.t b/perl/t/general/report.t
index 6f6b750..a841acd 100755
--- a/perl/t/general/report.t
+++ b/perl/t/general/report.t
@@ -11,7 +11,7 @@
use strict;
use warnings;
-use Test::More tests => 219;
+use Test::More tests => 222;
use Wallet::Admin;
use Wallet::Report;
@@ -366,6 +366,13 @@ is ($server->acl_add ('third', 'base', 'baz'), 1,
is (scalar (@acls), 0, 'There are no duplicate ACLs');
is ($report->error, undef, ' and no error');
+# See if the acl nesting report works correctly.
+is ($server->acl_add ('fourth', 'nested', 'second'), 1,
+ 'Adding an ACL as a nested entry for another works');
+@acls = $report->acls ('nesting', 'second');
+is (scalar (@acls), 1, ' and the nested report shows one nesting');
+is ($acls[0][1], 'fourth', ' with the correct ACL nesting it');
+
# Clean up.
$admin->destroy;
system ('rm -r test-files') == 0 or die "cannot remove test-files\n";