@@ -44,6 +44,30 @@ teardown() {
4444 curl -sI " https://${PROJNAME} .ddev.site:8026" | grep -i " https://novarnish.${PROJNAME} .ddev.site:8026/" > /dev/null || (echo " # https://${PROJNAME} .ddev.site:8026 did not redirect" >&3 && exit 1);
4545}
4646
47+ @test " install from directory with nonstandard port" {
48+ set -eu -o pipefail
49+ cd ${TESTDIR}
50+ ddev config --router-http-port 8080 --router-https-port 8443 --mailpit-http-port 18025 --mailpit-https-port 18026
51+ echo " # ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($( pwd) )" >&3
52+ ddev get ${DIR} > /dev/null
53+ ddev restart > /dev/null 2>&1
54+ for url in http://${PROJNAME} .ddev.site:8080/ http://extrahostname.ddev.site:8080/ http://extrafqdn.ddev.site:8080/ https://${PROJNAME} .ddev.site:8443/ https://extrahostname.ddev.site:8443/ https://extrafqdn.ddev.site:8443/ ; do
55+ # It's "Via:" with http and "via:" with https. Tell me why.
56+ echo " # test $url for via:.*varnish header" >&3
57+ curl -sI $url | grep -i " Via:.*varnish" > /dev/null || (echo " # varnish headers not shown for $url " >&3 && exit 1);
58+ echo " # test $url for phpinfo content" >&3
59+ curl -s $url | grep " allow_url_fopen" > /dev/null || (echo " # phpinfo information not shown in curl for $url " >&3 && exit 1);
60+ done
61+ for url in http://novarnish.${PROJNAME} .ddev.site:8080/ http://novarnish.extrahostname.ddev.site:8080/ http://novarnish.extrafqdn.ddev.site:8080/ https://novarnish.${PROJNAME} .ddev.site:8443/ https://novarnish.extrahostname.ddev.site:8443/ https://novarnish.extrafqdn.ddev.site:8443/ ; do
62+ echo " # test $url for phpinfo content" >&3
63+ curl -s $url | grep " allow_url_fopen" > /dev/null || (echo " # phpinfo information not shown in curl for $url " >&3 && exit 1);
64+ done
65+ echo " # test http://${PROJNAME} .ddev.site:18025 for http novarnish redirect" >&3
66+ curl -sI " http://${PROJNAME} .ddev.site:18025" | grep -i " http://novarnish.${PROJNAME} .ddev.site:18025/" > /dev/null || (echo " # http://${PROJNAME} .ddev.site:18025 did not redirect" >&3 && exit 1);
67+ echo " # test https://${PROJNAME} .ddev.site:18026 for https novarnish redirect" >&3
68+ curl -sI " https://${PROJNAME} .ddev.site:18026" | grep -i " https://novarnish.${PROJNAME} .ddev.site:18026/" > /dev/null || (echo " # https://${PROJNAME} .ddev.site:18026 did not redirect" >&3 && exit 1);
69+ }
70+
4771@test " install from release" {
4872 set -eu -o pipefail
4973 cd ${TESTDIR} || ( printf " unable to cd to ${TESTDIR} \n" && exit 1 )
0 commit comments