diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/client/basic-t.in | 15 | ||||
-rw-r--r-- | tests/server/backend-t.in | 9 |
2 files changed, 20 insertions, 4 deletions
diff --git a/tests/client/basic-t.in b/tests/client/basic-t.in index 4d9b796..8f7632c 100644 --- a/tests/client/basic-t.in +++ b/tests/client/basic-t.in @@ -54,7 +54,7 @@ runfailure () { } # Print the number of tests. -echo 17 +echo 20 # Find the client program. if [ -f ../data/test.keytab ] ; then @@ -65,7 +65,7 @@ else fi fi if [ ! -f data/test.keytab ] || [ -z "@REMCTLD@" ] ; then - for n in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ; do + for n in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ; do echo ok $n \# skip -- no Kerberos configuration done exit 0 @@ -136,6 +136,17 @@ if [ -f keytab.bak ] || [ -f keytab.new ] ; then else printcount "ok" fi +runsuccess "" -c fake-wallet get keytab -f keytab service/fake-test +if cmp keytab data/fake-data >/dev/null 2>&1 ; then + printcount "ok" +else + printcount "not ok" +fi +if [ -f keytab.new ] || [ ! -f keytab.bak ] ; then + printcount "not ok" +else + printcount "ok" +fi runsuccess "" -c fake-wallet get keytab -f keytab -S srvtab service/fake-srvtab if cmp keytab data/fake-keytab >/dev/null 2>&1 ; then printcount "ok" diff --git a/tests/server/backend-t.in b/tests/server/backend-t.in index 8509177..0c02598 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 => 1222; +use Test::More tests => 1224; # Create a dummy class for Wallet::Server that prints what method was called # with its arguments and returns data for testing. @@ -434,7 +434,12 @@ for my $command (sort keys %flag_commands) { } # Almost done. All that remains is to test the robustness of the bad -# character checks against every possible character. +# character checks against every possible character and test permitting the +# empty argument. +($out, $err) = run_backend ('show', 'type', ''); +is ($err, '', 'Allowed the empty argument'); +is ($OUTPUT, "command show type from admin (1.2.3.4) succeeded\n", + ' and success logged'); my $ok = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_/.-'; ($out, $err) = run_backend ('show', 'type', $ok); is ($err, '', 'Allowed all valid characters'); |