diff options
Diffstat (limited to 'tests/data')
-rw-r--r-- | tests/data/basic.conf | 2 | ||||
-rwxr-xr-x | tests/data/cmd-fake | 61 | ||||
-rwxr-xr-x[-rw-r--r--] | tests/data/cmd-wrapper (renamed from tests/data/cmd-wrapper.in) | 6 | ||||
-rwxr-xr-x | tests/data/fake-kadmin | 1 | ||||
-rw-r--r-- | tests/data/fake-srvtab | bin | 47 -> 50 bytes | |||
-rw-r--r-- | tests/data/full.conf | 4 | ||||
-rw-r--r-- | tests/data/full.conf.in | 4 | ||||
-rw-r--r-- | tests/data/wallet.conf | 1 |
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 Binary files differindex 3c0ec65..f454af2 100644 --- a/tests/data/fake-srvtab +++ b/tests/data/fake-srvtab 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'; |