aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2008-01-17 00:00:44 +0000
committerRuss Allbery <rra@stanford.edu>2008-01-17 00:00:44 +0000
commit426e3bc5f2af3f30524060812625204de73f78d0 (patch)
treeab7768156b8ebe9d3acb941f6d61173f2a16a98a /tests
parent2bc1f6cb234cc88f4f5ca82ed46ff06eb49bfa19 (diff)
Remove the right krb5.conf file in client tests. Strip any existing
wallet configuration from krb5.conf since it confuses the profile library. Add a test for printing keytabs to standard output.
Diffstat (limited to 'tests')
-rw-r--r--tests/client/basic-t.in9
-rwxr-xr-xtests/data/cmd-fake4
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/client/basic-t.in b/tests/client/basic-t.in
index 4a4a559..b4f539c 100644
--- a/tests/client/basic-t.in
+++ b/tests/client/basic-t.in
@@ -12,7 +12,7 @@
. "@abs_top_srcdir@/tests/libtest.sh"
# Print the number of tests.
-total=22
+total=23
count=1
echo "$total"
@@ -55,8 +55,10 @@ krb5conf=
for p in /etc/krb5.conf /usr/local/etc/krb5.conf data/krb5.conf ; do
if [ -r "$p" ] ; then
krb5conf="$p"
- sed -e '/^ *test-k5.stanford.edu =/,/}/d' \
+ sed -e '/^[ ]*test-k5.stanford.edu =/,/}/d' \
-e 's/\(default_realm.*=\) .*/\1 test-k5.stanford.edu/' \
+ -e 's/^[ ]*wallet_.*//' \
+ -e '/^[ ]*wallet[ ]*=[ ]*{/,/}/d' \
"$p" > ./krb5.conf
cat >> krb5.conf <<EOF
@@ -167,6 +169,7 @@ if cmp srvtab.bak data/fake-srvtab >/dev/null 2>&1 ; then
else
printcount "not ok"
fi
+runsuccess "This is a fake keytab." "$wallet" get keytab service/fake-output
runsuccess "Some stuff about service/fake-test" \
"$wallet" show keytab service/fake-test
runfailure 1 "wallet: Unknown object type srvtab" \
@@ -180,7 +183,7 @@ runsuccess "Expiration date of service/fake-test" \
# Clean up.
KRB5_CONFIG=
-rm data/krb5.conf
+rm krb5.conf
rm -f data/test.cache
if [ -f data/pid ] ; then
kill `cat data/pid`
diff --git a/tests/data/cmd-fake b/tests/data/cmd-fake
index 4e95bd8..e9744a2 100755
--- a/tests/data/cmd-fake
+++ b/tests/data/cmd-fake
@@ -76,6 +76,10 @@ get)
cat data/fake-keytab
exit 0
;;
+ service/fake-output)
+ printf 'This is a fake keytab.'
+ exit 0
+ ;;
*)
echo "Unknown keytab $1" >&2
exit 1