certbot/tests/integration/_common.sh
Jacob Hoffman-Andrews 88076e46c7 Improve debug logs. (#3126)
Print request and response bodies with newlines, rather than all on one line.
Remove "Omitted empty field" log, which gets logged meaninglessly for every JSON
serialization.
Remove duplicated logging of responses.
Log the base64 version of the nonce, rather than turning it into bytes and
logging the backslash-escaped version of those bytes.
Only pass -vv in tests.
2016-10-26 18:07:33 -07:00

37 lines
966 B
Bash
Executable file

#!/bin/sh
if [ "xxx$root" = "xxx" ];
then
# The -t is required on OS X. It provides a template file path for
# the kernel to use.
root="$(mktemp -d -t leitXXXX)"
echo "Root integration tests directory: $root"
fi
store_flags="--config-dir $root/conf --work-dir $root/work"
store_flags="$store_flags --logs-dir $root/logs"
tls_sni_01_port=5001
http_01_port=5002
export root store_flags tls_sni_01_port http_01_port
certbot_test () {
certbot_test_no_force_renew \
--renew-by-default \
"$@"
}
certbot_test_no_force_renew () {
certbot \
--server "${SERVER:-http://localhost:4000/directory}" \
--no-verify-ssl \
--tls-sni-01-port $tls_sni_01_port \
--http-01-port $http_01_port \
--manual-test-mode \
$store_flags \
--non-interactive \
--no-redirect \
--agree-tos \
--register-unsafely-without-email \
--debug \
-vv \
"$@"
}