Test additional subcommands in integration tests (#4855)

* Test additional subcommands

* Test rollback

* quote original variable

* Specifically set installer to work around #4858.
This commit is contained in:
Brad Warren
2017-06-21 13:49:15 -07:00
committed by Peter Eckersley
parent ed717d6bc4
commit 93f094a86e
2 changed files with 36 additions and 2 deletions
+9 -2
View File
@@ -6,14 +6,18 @@
export PATH="/usr/sbin:$PATH" # /usr/sbin/nginx
nginx_root="$root/nginx"
mkdir $nginx_root
root="$nginx_root" ./certbot-nginx/tests/boulder-integration.conf.sh > $nginx_root/nginx.conf
original=$(root="$nginx_root" ./certbot-nginx/tests/boulder-integration.conf.sh)
nginx_conf="$nginx_root/nginx.conf"
echo "$original" > $nginx_conf
killall nginx || true
nginx -c $nginx_root/nginx.conf
certbot_test_nginx () {
certbot_test \
--configurator nginx \
--authenticator nginx \
--installer nginx \
--nginx-server-root $nginx_root \
"$@"
}
@@ -23,6 +27,9 @@ echo | openssl s_client -connect localhost:5001 \
| openssl x509 -out $root/nginx.pem
diff -q $root/nginx.pem $root/conf/live/nginx.wtf/cert.pem
certbot_test_nginx rollback --checkpoints 9001
diff -q <(echo "$original") $nginx_conf
# note: not reached if anything above fails, hence "killall" at the
# top
nginx -c $nginx_root/nginx.conf -s stop