diff options
author | Russ Allbery <rra@stanford.edu> | 2007-10-10 22:47:14 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2007-10-10 22:47:14 +0000 |
commit | 5370a35b615d5d868829ba52748208d9f1b129a5 (patch) | |
tree | c1337b976c7f623680d25901c325ab5ba8c545a8 /tests/server | |
parent | e339fc12869fe816d448930c44f96627cf780253 (diff) |
Add history to the wallet-backend and to its documentation and the end-user
documentation. Fix a variety of other problems with the documentation of
the ACLs used and add mentions of getattr and setattr to a few places
where they were missing.
Diffstat (limited to 'tests/server')
-rw-r--r-- | tests/server/backend-t.in | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/server/backend-t.in b/tests/server/backend-t.in index e8558f5..85fb0ce 100644 --- a/tests/server/backend-t.in +++ b/tests/server/backend-t.in @@ -9,7 +9,7 @@ use strict; use IO::String; -use Test::More tests => 790; +use Test::More tests => 802; # Create a dummy class for Wallet::Server that prints what method was called # with its arguments and returns data for testing. @@ -105,6 +105,13 @@ sub get { return 'get'; } +sub history { + shift; + print "history @_\n"; + return if $_[0] eq 'error'; + return 'history'; +} + sub owner { shift; print "owner @_\n"; @@ -174,6 +181,7 @@ my %commands = (create => [2, 2], get => [2, 2], getacl => [3, 3], getattr => [3, 3], + history => [2, 2], owner => [2, 3], setacl => [4, 4], setattr => [4, 9], @@ -269,7 +277,7 @@ for my $command (qw/create destroy setacl setattr store/) { ' and ran the right method'); $error++; } -for my $command (qw/expires get getacl getattr owner show/) { +for my $command (qw/expires get getacl getattr history owner show/) { my $method = { getacl => 'acl', getattr => 'attr' }->{$command}; $method ||= $command; my @extra = ('foo') x ($commands{$command}[0] - 2); @@ -280,7 +288,7 @@ for my $command (qw/expires get getacl getattr owner show/) { is ($out, "$new\n$method type name$extra\nattr1\nattr2\n", ' and ran the right method with output'); } else { - my $newline = ($command eq 'get' or $command eq 'show') ? '' : "\n"; + my $newline = ($command =~ /^(get|history|show)\z/) ? '' : "\n"; ($out, $err) = run_backend ($command, 'type', 'name', @extra); is ($err, '', "Command $command ran with no errors"); is ($out, "$new\n$method type name$extra\n$method$newline", |