diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2016-09-13 18:54:09 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2016-09-13 18:54:09 +0000 |
commit | 200e948e8fa5aa7c10bac9b8dcf49a32e2e63edf (patch) | |
tree | c44587deeab97317b4f7d51a3a712316ae48c79b /regress/usr.sbin | |
parent | 3908c7822fb0a435e623fc17b41c95572ec05ea9 (diff) |
First stab at acme-client regress test.
Someone who actually knows how this works please improve it :)
Diffstat (limited to 'regress/usr.sbin')
-rw-r--r-- | regress/usr.sbin/acme-client/Makefile | 27 | ||||
-rw-r--r-- | regress/usr.sbin/acme-client/create-httpd-env.sh | 16 |
2 files changed, 43 insertions, 0 deletions
diff --git a/regress/usr.sbin/acme-client/Makefile b/regress/usr.sbin/acme-client/Makefile new file mode 100644 index 00000000000..a5485588785 --- /dev/null +++ b/regress/usr.sbin/acme-client/Makefile @@ -0,0 +1,27 @@ +REGRESS_TARGETS=acme + +acme: start_httpd + /usr/sbin/acme-client \ + -C ${.OBJDIR}/www/acme \ + -c ${.OBJDIR}/etc/ssl/acme \ + -f ${.OBJDIR}/etc/acme/privkey.pem \ + -k ${.OBJDIR}/etc/ssl/acme/private/privkey.pem \ + -nNv -s letsencrypt-staging `hostname` + /usr/sbin/acme-client \ + -C ${.OBJDIR}/www/acme \ + -c ${.OBJDIR}/etc/ssl/acme \ + -f ${.OBJDIR}/etc/acme/privkey.pem \ + -k ${.OBJDIR}/etc/ssl/acme/private/privkey.pem \ + -rv -s letsencrypt-staging `hostname` + pkill -xf "/usr/sbin/httpd -f ${.OBJDIR}/etc/httpd.conf" + +start_httpd: + sh ${.CURDIR}/create-httpd-env.sh ${.OBJDIR} + /bin/echo `/bin/hostname` + /usr/sbin/httpd -f ${.OBJDIR}/etc/httpd.conf + sleep .1 # give httpd some time to spin up + pgrep -xf "/usr/sbin/httpd -f ${.OBJDIR}/etc/httpd.conf" + +.PHONY: ${REGRESS_TARGETS} start_httpd + +.include <bsd.regress.mk> diff --git a/regress/usr.sbin/acme-client/create-httpd-env.sh b/regress/usr.sbin/acme-client/create-httpd-env.sh new file mode 100644 index 00000000000..af3a7076602 --- /dev/null +++ b/regress/usr.sbin/acme-client/create-httpd-env.sh @@ -0,0 +1,16 @@ +set -e +mkdir -p $1/www/htdocs +mkdir -p $1/www/acme +mkdir -p $1/www/logs +mkdir -p $1/etc/acme +mkdir -p $1/etc/ssl/acme/private +cat <<END > $1/etc/httpd.conf +chroot "$1/www" +server "default" { + listen on "*" port 80 + location "/.well-known/acme-challenge/*" { + root "/acme" + root strip 2 + } +} +END |