Changeset 849b87e in mod_gnutls


Ignore:
Timestamp:
Oct 30, 2018, 3:35:21 PM (10 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
debian/master, master
Children:
0062ede
Parents:
04753db8
Message:

Test suite: Add support for IP-based virtual hosts

  • Pass TEST_IP to the tests
  • Add IP addresses to the server certificate
  • Allow tests to access the server via an IP address instead of TEST_HOST
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r04753db8 r849b87e  
    252252                      "[::1] 127.0.0.1". Note that IPv6 addresses must be \
    253253                      enclosed in square brackets.])
    254 AM_SUBST_NOTMAKE(TEST_IP)
    255254
    256255: ${TEST_LOCK_WAIT:="30"}
  • test/Makefile.am

    r04753db8 r849b87e  
    253253        export AP_LIBEXECDIR=@AP_LIBEXECDIR@; \
    254254        export TEST_LOCK_WAIT="@TEST_LOCK_WAIT@"; \
     255        export TEST_IP="@TEST_IP@"; \
    255256        export TEST_HOST="@TEST_HOST@"; \
    256257        export TEST_PORT="$(TEST_PORT)"; \
  • test/runtests

    r04753db8 r849b87e  
    217217fi
    218218
     219if [ -n "${TARGET_IP}" ]; then
     220    TARGET="${TARGET_IP}"
     221else
     222    TARGET="${TEST_HOST}"
     223fi
     224
    219225# PID file for sleep command (explanation below)
    220226sleep_pidfile="$(mktemp mod_gnutls_test-XXXXXX.pid)"
     
    232238if (sed -r "s/__HOSTNAME__/${TEST_HOST}/;s/\r?$/\r/" <${testdir}/input && \
    233239           run_with_pidfile "${sleep_pidfile}" sleep "${TEST_QUERY_TIMEOUT}" &) | \
    234        gnutls-cli -p "${TEST_PORT}" $(cat ${testdir}/gnutls-cli.args) "${TEST_HOST}" \
     240       gnutls-cli -p "${TEST_PORT}" $(cat ${testdir}/gnutls-cli.args) "${TARGET}" \
    235241       | tee "$output" && test "${PIPESTATUS[1]}" -eq 0;
    236242then
  • test/server.template.in

    r04753db8 r849b87e  
    66dns_name="__HOSTNAME__"
    77### ocsp_uri=http://__HOSTNAME__:__OCSP_PORT__/ocsp/
     8__IP_ADDRESSES__
  • test/test_ca.mk

    r04753db8 r849b87e  
    1313                        -e s/__OCSP_PORT__/$(OCSP_PORT)/ $@; \
    1414        fi
     15        for i in $$(echo $(TEST_IP)); do \
     16                i="$${i%\]}"; \
     17                IP_ADDRS="$${IP_ADDRS}\nip_address = $${i#\[}"; \
     18        done; \
     19        sed -i -e "s,__IP_ADDRESSES__,$${IP_ADDRS}," $@
    1520
    1621%.uid: $(srcdir)/%.uid.in
Note: See TracChangeset for help on using the changeset viewer.