From de36d3b27039141ba6402cb91a19a1d852185a92 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Wed, 4 Feb 2009 14:11:42 -0500 Subject: tests: making the temporary directory be created in a new place. make sure the proxy command used in the test is the new subcommand. --- tests/basic | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'tests/basic') diff --git a/tests/basic b/tests/basic index 5c6b4bb..0cad727 100755 --- a/tests/basic +++ b/tests/basic @@ -89,12 +89,8 @@ trap failed_cleanup EXIT ## the tests, not system-wide: # make temp dir -TEMPDIR="$TESTDIR"/tmp -if [ -e "$TEMPDIR" ] ; then - echo "tempdir '$TEMPDIR' already exists." - exit 1 -fi -mkdir -p "$TEMPDIR" +mkdir -p "$TESTDIR"/tmp +TEMPDIR=$(mktemp -d ${TMPDIR:-"$TESTDIR"/tmp}/monkeyspheretest.XXXXXXX) # Use the local copy of executables first, instead of system ones. # This should help us test without installing. @@ -130,6 +126,7 @@ cp -a "$TESTDIR"/home/testuser "$TEMPDIR"/ # set up environment for testuser export TESTHOME="$TEMPDIR"/testuser export GNUPGHOME="$TESTHOME"/.gnupg +chmod 0700 "$GNUPGHOME" export SSH_ASKPASS="$TESTHOME"/.ssh/askpass export MONKEYSPHERE_HOME="$TESTHOME"/.monkeysphere cat <> "$TESTHOME"/.ssh/config @@ -236,7 +233,7 @@ gpgadmin --armor --export "$HOSTKEYID" | gpg --import # teach the "server" about the testuser's key echo "##################################################" echo "### export testuser key to server..." -gpg --export testuser | monkeysphere-authentication gpg-cmd --import +gpg --export testuser | monkeysphere-authentication expert gpg-cmd --import # update authorized_keys for user echo "##################################################" -- cgit v1.2.3