Changeset e3cbda4 in mod_gnutls
- Timestamp:
- Nov 16, 2013, 2:46:50 AM (9 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, main, master, proxy-ticket, upstream
- Children:
- 07889ab
- Parents:
- cf2b905
- git-author:
- Daniel Kahn Gillmor <dkg@…> (01/30/13 04:15:32)
- git-committer:
- Daniel Kahn Gillmor <dkg@…> (11/16/13 02:46:50)
- Location:
- t
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
t/.gitignore
rcf2b905 re3cbda4 11 11 server.uid 12 12 server.template 13 msva.gnupghome -
t/Makefile
rcf2b905 re3cbda4 10 10 # chosen at random: 11 11 export TEST_PORT ?= 9932 12 export MSVA_PORT ?= 9933 12 13 13 14 export TEST_GAP ?= 1.5 … … 71 72 certtool --generate-certificate --load-ca-certificate=authority/x509.pem --load-ca-privkey=authority/secret.key --load-request=$(dir $@)cert-request --template=$< > $@ 72 73 73 setup.done: $(all_tokens) 74 msva.gnupghome/trustdb.gpg: authority/minimal.pgp client/cert.pgp 75 mkdir -m 0700 $(dir $@) 76 GNUPGHOME=$(dir $@) gpg --import < $< 77 printf "%s:6:\n" "$$(GNUPGHOME=authority gpg --with-colons --list-secret-keys --fingerprint | grep ^fpr: | cut -f 10 -d :)" | GNUPGHOME=$(dir $@) gpg --import-ownertrust 78 GNUPGHOME=$(dir $@) gpg --import < client/cert.pgp 79 printf "keyserver does-not-exist.example\n" > msva.gnupghome/gpg.conf 80 81 82 setup.done: $(all_tokens) msva.gnupghome/trustdb.gpg 74 83 mkdir -p logs cache outputs 75 84 touch setup.done … … 77 86 78 87 clean: 79 rm -rf server client authority logs cache outputs setup.done server.template 88 rm -rf server client authority logs cache outputs setup.done server.template msva.gnupghome 80 89 81 90 .PHONY: all clean -
t/runtests
rcf2b905 re3cbda4 8 8 9 9 BADVARS=0 10 for v in TEST_HOST TEST_IP TEST_PORT TEST_QUERY_DELAY TEST_GAP ; do10 for v in TEST_HOST TEST_IP TEST_PORT TEST_QUERY_DELAY TEST_GAP MSVA_PORT; do 11 11 if [ ! -v "$v" ]; then 12 12 printf "You need to set the %s environment variable\n" "$v" >&2 … … 24 24 fi 25 25 26 function stop_msva() { 27 kill %1 28 } 29 26 30 function apache_down_err() { 27 31 printf "FAILURE: %s\n" "$TEST_NAME" … … 33 37 printf "\nApache error logs:\n" 34 38 tail "../../logs/${TEST_NAME}.error.log" 39 stop_msva 35 40 } 36 41 … … 41 46 fi 42 47 48 GNUPGHOME=$(pwd)/msva.gnupghome MSVA_KEYSERVER_POLICY=never monkeysphere-validation-agent & 49 50 trap stop_msva EXIT 51 52 sleep "$TEST_GAP" 53 54 printf "TESTING: initial MSVA verification\n" 55 MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" msva-query-agent https "$(cat client.uid)" x509pem client < client/x509.pem 56 printf "\nSUCCESS: initial MSVA verification\n" 57 43 58 for t in $tests; do 59 sleep "$TEST_GAP" 44 60 export TEST_NAME="$(basename "$t")" 45 61 output="../../outputs/${TEST_NAME}.output" … … 53 69 printf "TESTING: %s%s\n" "$TEST_NAME" "$EXPECTED_FAILURE" 54 70 trap apache_down_err EXIT 55 /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start || [ -e fail.server ]71 MONKEYSPHERE_VALIDATION_AGENT_SOCKET="http://127.0.0.1:$MSVA_PORT" /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k start || [ -e fail.server ] 56 72 57 73 if (sed "s/__HOSTNAME__/${TEST_HOST}/" < ./input && sleep "$TEST_QUERY_DELAY") | \ … … 72 88 fi 73 89 /usr/sbin/apache2 -f "$(pwd)/apache.conf" -k stop || [ -e fail.server ] 74 trap -EXIT90 trap stop_msva EXIT 75 91 printf "SUCCESS: %s\n" "$TEST_NAME" 76 92 cd ../.. 77 sleep "$TEST_GAP"78 93 done 94 95 stop_msva
Note: See TracChangeset
for help on using the changeset viewer.