summaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2010-02-21 17:45:55 -0800
committerRuss Allbery <rra@stanford.edu>2010-02-21 17:45:55 -0800
commit60210334fa3dbd5dd168199063c6ee850d750d0c (patch)
tree31e832ba6788076075d38e20ffd27ebf09430407 /tests/data
parente571a8eb96f42de5a114cf11ff1c3d63e5a8d301 (diff)
Imported Upstream version 0.10
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/basic.conf2
-rwxr-xr-xtests/data/cmd-fake61
-rwxr-xr-x[-rw-r--r--]tests/data/cmd-wrapper (renamed from tests/data/cmd-wrapper.in)6
-rwxr-xr-xtests/data/fake-kadmin1
-rw-r--r--tests/data/fake-srvtabbin47 -> 50 bytes
-rw-r--r--tests/data/full.conf4
-rw-r--r--tests/data/full.conf.in4
-rw-r--r--tests/data/wallet.conf1
8 files changed, 15 insertions, 64 deletions
diff --git a/tests/data/basic.conf b/tests/data/basic.conf
index 7ad998f..5f3c2a3 100644
--- a/tests/data/basic.conf
+++ b/tests/data/basic.conf
@@ -1,4 +1,4 @@
# remctl configuration for wallet client tests.
-# $Id$
+fake-wallet store data/cmd-fake stdin=last ANYUSER
fake-wallet ALL data/cmd-fake ANYUSER
diff --git a/tests/data/cmd-fake b/tests/data/cmd-fake
index 3ffd9cc..add72fc 100755
--- a/tests/data/cmd-fake
+++ b/tests/data/cmd-fake
@@ -1,11 +1,10 @@
#!/bin/sh
-# $Id$
#
# This is a fake wallet backend that returns bogus data for verification by
# the client test suite. It doesn't test any of the wallet server code.
#
# Written by Russ Allbery <rra@stanford.edu>
-# Copyright 2007, 2008 Board of Trustees, Leland Stanford Jr. University
+# Copyright 2007, 2008, 2010 Board of Trustees, Leland Stanford Jr. University
# See LICENSE for licensing terms.
command="$1"
@@ -18,55 +17,6 @@ if [ "$type" != "keytab" ] && [ "$type" != "file" ] ; then
fi
case "$command" in
-getattr)
- if [ -n "$3" ] ; then
- echo "Too many arguments" >&2
- exit 1
- fi
- if [ "$type" != "keytab" ] || [ "$2" != sync ] ; then
- echo "Unknown attribute $2" >&2
- exit 1
- fi
- case "$1" in
- service/fake-srvtab)
- if [ -f sync-kaserver ] ; then
- echo "kaserver"
- fi
- ;;
- *)
- echo "Looking at sync attribute of wrong keytab" >&2
- exit 1
- ;;
- esac
- ;;
-setattr)
- if [ -n "$4" ] ; then
- echo "Too many arguments" >&2
- exit 1
- fi
- if [ "$type" != "keytab" ] || [ "$2" != sync ] ; then
- echo "Unknown attribute $2" >&2
- exit 1
- fi
- case "$1" in
- service/fake-srvtab)
- if [ "$3" = "kaserver" ] ; then
- touch sync-kaserver
- else
- if [ "$3" = "" ] ; then
- rm sync-kaserver
- else
- echo "Invalid attribute value $3" >&2
- exit 1
- fi
- fi
- ;;
- *)
- echo "Looking at sync attribute of wrong keytab" >&2
- exit 1
- ;;
- esac
- ;;
check)
if [ -n "$2" ] ; then
echo "Too many arguments" >&2
@@ -132,10 +82,15 @@ get)
;;
store)
if [ -n "$3" ] ; then
- echo "Too many arguments" >&2
+ echo 'Too many arguments' >&2
+ exit 1
+ fi
+ if [ -n "$2" ] ; then
+ echo 'stdin remctld configuration not supported' >&2
exit 1
fi
- printf "$type $1\n$2" > store-output
+ printf "$type $1\n" > store-output
+ cat >> store-output
;;
show)
if [ -n "$2" ] ; then
diff --git a/tests/data/cmd-wrapper.in b/tests/data/cmd-wrapper
index e119002..79b1943 100644..100755
--- a/tests/data/cmd-wrapper.in
+++ b/tests/data/cmd-wrapper
@@ -1,10 +1,8 @@
#!/bin/sh
-# $Id$
#
# Wrapper around the standard wallet-backend script that sets the Perl INC
# path and the WALLET_CONFIG environment variable appropriately.
-WALLET_CONFIG='@abs_top_srcdir@/tests/data/wallet.conf'
+WALLET_CONFIG="$SOURCE/data/wallet.conf"
export WALLET_CONFIG
-exec perl -I'@abs_top_srcdir@/perl' '@abs_top_srcdir@/server/wallet-backend' \
- -q "$@"
+exec perl -I"$SOURCE/../perl" "$SOURCE/../server/wallet-backend" -q "$@"
diff --git a/tests/data/fake-kadmin b/tests/data/fake-kadmin
index 81dc999..61906a4 100755
--- a/tests/data/fake-kadmin
+++ b/tests/data/fake-kadmin
@@ -1,5 +1,4 @@
#!/usr/bin/perl -w
-# $Id$
#
# fake-kadmin -- Fake kadmin.local used to test the keytab backend.
#
diff --git a/tests/data/fake-srvtab b/tests/data/fake-srvtab
index 3c0ec65..f454af2 100644
--- a/tests/data/fake-srvtab
+++ b/tests/data/fake-srvtab
Binary files differ
diff --git a/tests/data/full.conf b/tests/data/full.conf
new file mode 100644
index 0000000..941a9ac
--- /dev/null
+++ b/tests/data/full.conf
@@ -0,0 +1,4 @@
+# remctl configuration for full wallet client tests.
+
+wallet store data/cmd-wrapper stdin=4 ANYUSER
+wallet ALL data/cmd-wrapper ANYUSER
diff --git a/tests/data/full.conf.in b/tests/data/full.conf.in
deleted file mode 100644
index b97a4bc..0000000
--- a/tests/data/full.conf.in
+++ /dev/null
@@ -1,4 +0,0 @@
-# remctl configuration for full wallet client tests.
-# $Id$
-
-wallet ALL @abs_top_builddir@/tests/data/cmd-wrapper ANYUSER
diff --git a/tests/data/wallet.conf b/tests/data/wallet.conf
index b864e5e..0a232dd 100644
--- a/tests/data/wallet.conf
+++ b/tests/data/wallet.conf
@@ -1,5 +1,4 @@
# wallet.conf -- Test wallet server configuration. -*- perl -*-
-# $Id$
# Always test with SQLite.
$DB_DRIVER = 'SQLite';