Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/certbot/certbot.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJacob Hoffman-Andrews <github@hoffman-andrews.com>2017-03-30 02:48:08 +0300
committerGitHub <noreply@github.com>2017-03-30 02:48:08 +0300
commitd5f1edf2bb85cba4c0de18722b29e080fb43d4d9 (patch)
tree69e60e8812712b82e6a750b5ee68ef1daf923108 /tests
parent6fb78dab671f723f6b2b4a2d0846fbec0e9634c3 (diff)
Dump Boulder logs on integration test failures. (#4442)
Might help debug #4363. Also: make "bash" vs "sh" explicit move the paranoia flags (-ex) from the shebang into the body add -u (fail on unset variables) change _common to work with -u remove some env vars that were no longer used remove shebang from _common.sh because it's meant to be sourced, not run
Diffstat (limited to 'tests')
-rwxr-xr-xtests/boulder-integration.sh15
-rwxr-xr-xtests/integration/_common.sh13
2 files changed, 15 insertions, 13 deletions
diff --git a/tests/boulder-integration.sh b/tests/boulder-integration.sh
index ca6f48e60..6612b2e67 100755
--- a/tests/boulder-integration.sh
+++ b/tests/boulder-integration.sh
@@ -1,4 +1,4 @@
-#!/bin/sh -xe
+#!/bin/bash
# Simple integration test. Make sure to activate virtualenv beforehand
# (source venv/bin/activate) and that you are running Boulder test
# instance (see ./boulder-fetch.sh).
@@ -8,12 +8,11 @@
#
# Note: this script is called by Boulder integration test suite!
+set -eux
+
. ./tests/integration/_common.sh
export PATH="$PATH:/usr/sbin" # /usr/sbin/nginx
-export GOPATH="${GOPATH:-/tmp/go}"
-export PATH="$GOPATH/bin:$PATH"
-
if [ `uname` = "Darwin" ];then
readlink="greadlink"
else
@@ -27,6 +26,14 @@ cleanup_and_exit() {
echo Kill server subprocess, left running by abnormal exit
kill $SERVER_STILL_RUNNING
fi
+ # Dump boulder logs in case they contain useful debugging information.
+ : "------------------ ------------------ ------------------"
+ : "------------------ begin boulder logs ------------------"
+ : "------------------ ------------------ ------------------"
+ docker logs boulder_boulder_1
+ : "------------------ ------------------ ------------------"
+ : "------------------ end boulder logs ------------------"
+ : "------------------ ------------------ ------------------"
exit $EXIT_STATUS
}
diff --git a/tests/integration/_common.sh b/tests/integration/_common.sh
index 9b44631d4..8d4baff95 100755
--- a/tests/integration/_common.sh
+++ b/tests/integration/_common.sh
@@ -1,12 +1,7 @@
-#!/bin/sh
-
-if [ "xxx$root" = "xxx" ];
-then
- # The -t is required on macOS. It provides a template file path for
- # the kernel to use.
- root="$(mktemp -d -t leitXXXX)"
- echo "Root integration tests directory: $root"
-fi
+# The -t is required on macOS. It provides a template file path for
+# the kernel to use.
+root=${root:-$(mktemp -d -t leitXXXX)}
+echo "Root integration tests directory: $root"
store_flags="--config-dir $root/conf --work-dir $root/work"
store_flags="$store_flags --logs-dir $root/logs"
tls_sni_01_port=5001