X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=tests%2Fbasic;h=5006f8fa5cfb8c91de2b48f91ca6b1bdfcbb7a05;hb=666062a6c5e14ac3e54a405d9a52ef3208ff649e;hp=0d780530fbaaab30a36294f82870b61d767c6f17;hpb=ddb8c65eb135c54fe21e20dafdf7b69a20107703;p=monkeysphere.git diff --git a/tests/basic b/tests/basic index 0d78053..5006f8f 100755 --- a/tests/basic +++ b/tests/basic @@ -123,7 +123,7 @@ export PATH="$TESTDIR"/../src:"$TESTDIR"/../src/keytrans:"$PATH" export MONKEYSPHERE_SYSDATADIR="$TEMPDIR" export MONKEYSPHERE_SYSCONFIGDIR="$TEMPDIR" -export MONKEYSPHERE_SYSSHAREDIR="$TESTDIR"/../src +export MONKEYSPHERE_SYSSHAREDIR="$TESTDIR"/../src/share export MONKEYSPHERE_MONKEYSPHERE_USER=$(whoami) export MONKEYSPHERE_CHECK_KEYSERVER=false export MONKEYSPHERE_LOG_LEVEL=DEBUG @@ -168,14 +168,15 @@ HostKey ${MONKEYSPHERE_SYSDATADIR}/ssh_host_rsa_key AuthorizedKeysFile ${MONKEYSPHERE_SYSDATADIR}/authentication/authorized_keys/%u EOF -# set up monkeysphere-server -echo "### configuring monkeysphere..." +# set up monkeysphere host +echo "### configuring monkeysphere host..." mkdir -p -m 750 "$MONKEYSPHERE_SYSDATADIR"/host -mkdir -p -m 700 "$MONKEYSPHERE_SYSDATADIR"/authentication -mkdir -p -m 700 "$MONKEYSPHERE_SYSDATADIR"/authentication/authorized_keys -mkdir -p -m 700 "$MONKEYSPHERE_SYSDATADIR"/tmp -cp etc/monkeysphere/monkeysphere-server.conf "$TEMPDIR"/monkeysphere-server.conf -cat <> "$TEMPDIR"/monkeysphere-server.conf + +# set up monkeysphere authentication +echo "### configuring monkeysphere authentication..." +mkdir -p -m 700 "$MONKEYSPHERE_SYSDATADIR"/authentication/{authorized_keys,core,sphere,tmp} +cp etc/monkeysphere/monkeysphere-authentication.conf "$TEMPDIR"/ +cat <> "$TEMPDIR"/monkeysphere-authentication.conf AUTHORIZED_USER_IDS="$MONKEYSPHERE_HOME/authentication/authorized_user_ids" EOF cat < "$MONKEYSPHERE_SYSDATADIR"/authentication/sphere/gpg.conf @@ -189,10 +190,10 @@ EOF # create a new host key echo "### generating server key..." # add gpg.conf with quick-random -get_gpg_prng_arg >> "$MONKEYSPHERE_SYSCONFIGDIR"/gnupg-host/gpg.conf +get_gpg_prng_arg >> "$MONKEYSPHERE_SYSCONFIGDIR"/host/gpg.conf echo | monkeysphere-host expert gen-key --length 1024 --expire 0 testhost # remove the gpg.conf -rm "$MONKEYSPHERE_SYSCONFIGDIR"/gnupg-host/gpg.conf +rm "$MONKEYSPHERE_SYSCONFIGDIR"/host/gpg.conf HOSTKEYID=$( monkeysphere-host show-key | grep '^OpenPGP fingerprint: ' | cut -f3 -d\ )