testing: setting up the fake testuser account with an authorized_user_id.
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 26 Oct 2008 06:56:03 +0000 (02:56 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 26 Oct 2008 06:56:03 +0000 (02:56 -0400)
tests/basic
tests/home/testuser/.monkeysphere/authorized_user_ids [new file with mode: 0644]

index 9f4d02ecc638063746c7dba41e06d40a48a9fa40..8d2b8f8768e2c25545626a368afc977a7d757446 100755 (executable)
@@ -85,6 +85,11 @@ cat <<EOF >> "$TEMPDIR"/testuser/.monkeysphere/monkeysphere.conf
 KNOWN_HOSTS=$TEMPDIR/testuser/.ssh/known_hosts
 EOF
 
+# set up a simple default monkeysphere-server.conf
+cat <<EOF >> "$TEMPDIR"/monkeysphere-server.conf
+AUTHORIZED_USER_IDS="$TEMPDIR/testuser/.monkeysphere/authorized_user_ids"
+EOF
+
 ### SERVER TESTS
 
 # setup monkeysphere temp gnupghome directories
@@ -149,8 +154,8 @@ gpgadmin --armor --export "$HOSTKEYID" | gpg --import
 # teach the "server" about the testuser's key
 echo "### export testuser key to server..."
 gpg --export testuser | monkeysphere-server gpg-authentication-cmd --import
-echo "### update server authorized_keys file for testuser..."
-monkeysphere-server update-users testuser
+echo "### update server authorized_keys file for this testuser..."
+monkeysphere-server update-users "$USER"
 
 # connect to test sshd, using monkeysphere-ssh-proxycommand to verify
 # the identity before connection.  This should work in both directions!
diff --git a/tests/home/testuser/.monkeysphere/authorized_user_ids b/tests/home/testuser/.monkeysphere/authorized_user_ids
new file mode 100644 (file)
index 0000000..4b51eaf
--- /dev/null
@@ -0,0 +1 @@
+Monkeysphere Test Suite Test User (DO NOT USE!!!) <testuser@example.net>