summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@phys.columbia.edu>2008-10-25 15:50:59 -0400
committerJameson Graef Rollins <jrollins@phys.columbia.edu>2008-10-25 15:50:59 -0400
commit7b30291a2d162934c98e361256fd29b54c76854b (patch)
tree4d50d67637bbd5b5a95202ac1def63de41effe6f /tests
parent46aa44a14c0812905d3f13ebbd84981cd5f87fd2 (diff)
more tweaks to test script.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/basic b/tests/basic
index e14b765..fc7dfba 100755
--- a/tests/basic
+++ b/tests/basic
@@ -18,7 +18,6 @@ gpgadmin() {
GNUPGHOME="$TESTDIR"/home/admin/.gnupg gpg "$@"
}
-
# cleanup:
cleanup() {
# FIXME: stop the sshd process
@@ -33,7 +32,7 @@ cleanup() {
}
## setup trap
-#trap cleanup EXIT
+trap cleanup EXIT
## set up some variables to ensure that we're operating strictly in
## the tests, not system-wide:
@@ -61,6 +60,7 @@ export MONKEYSPHERE_CHECK_KEYSERVER=false
SSHD_CONFIG="$TEMPDIR"/sshd_config
export SOCKET="$TEMPDIR"/ssh-socket
+
### SERVER TESTS
# create the temp gnupghome directories
@@ -68,7 +68,7 @@ mkdir -p -m 750 "$MONKEYSPHERE_SYSDATADIR"/gnupg-host
mkdir -p -m 700 "$MONKEYSPHERE_SYSDATADIR"/gnupg-authentication
# add the quick-random option to the gpg host config
-echo "quick-random" >> "$MONKEYSPHERE_SYSCONFIGDIR"/gnupg-host.conf
+echo "quick-random" >> "$MONKEYSPHERE_SYSCONFIGDIR"/gnupg-host/gpg.conf
# create a new host key
echo "### generating server key..."
@@ -114,6 +114,10 @@ echo "### generating key for testuser..."
MONKEYSPHERE_GNUPGHOME="$TEMPDIR"/testuser/.gnupg \
monkeysphere gen-subkey --expire 0
+# add server key to testuser keychain
+monkeysphere-server gpg-authentication-cmd "--armor --export $HOSTKEYID" | \
+ GNUPGHOME="$TEMPDIR"/testuser/.gnupg gpg --import
+
# connect to test sshd, using monkeysphere to verify the identity
# before connection.
echo "### connecting to sshd socket..."
@@ -122,5 +126,8 @@ ssh -oProxyCommand="$PROXY_COMMAND" testhost
# create a new client side key, certify it with the "CA", use it to
# log in.
-
## FIXME: implement!
+
+
+### FINISH
+read -p "press enter to cleanup tmp:"