From a54f672b5cf861240380046f2e9c174299daccf0 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 29 Dec 2018 04:22:28 -0500 Subject: [PATCH] tests: do not generate dhparam for tests Tests will run much quicker if we don't need to regenerate this file. Note that this file _should not_ be used within installs. --- plugins/nginx-vhosts/install | 2 +- tests/ci/setup.sh | 6 ++++++ tests/dhparam.pem | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 tests/dhparam.pem diff --git a/plugins/nginx-vhosts/install b/plugins/nginx-vhosts/install index 4cb51cb2235..62f31fc286d 100755 --- a/plugins/nginx-vhosts/install +++ b/plugins/nginx-vhosts/install @@ -31,10 +31,10 @@ chmod 0440 /etc/sudoers.d/dokku-nginx # if dhparam.pem has not been created, create it the first time if [[ ! -f /etc/nginx/dhparam.pem ]]; then openssl dhparam -out /etc/nginx/dhparam.pem 2048 - chown root:root /etc/nginx/dhparam.pem fi mkdir -p /etc/nginx/conf.d +chown root:root /etc/nginx/dhparam.pem chown root:root /etc/nginx/conf.d cat< /etc/nginx/conf.d/dokku.conf include $DOKKU_ROOT/*/nginx.conf; diff --git a/tests/ci/setup.sh b/tests/ci/setup.sh index 3a882fb51f5..d86da002934 100755 --- a/tests/ci/setup.sh +++ b/tests/ci/setup.sh @@ -9,6 +9,12 @@ setup_circle() { # need to add the dokku user to the docker group sudo usermod -G docker dokku [[ "$1" == "buildstack" ]] && BUILD_STACK=true make -e stack + + sudo add-apt-repository -y ppa:nginx/stable + sudo apt-get update + sudo apt-get -qq -y install nginx + sudo cp tests/dhparam.pem /etc/nginx/dhparam.pem + sudo -E CI=true make -e install sudo -E make -e setup-deploy-tests bash --version diff --git a/tests/dhparam.pem b/tests/dhparam.pem new file mode 100644 index 00000000000..5a2ffdfafd8 --- /dev/null +++ b/tests/dhparam.pem @@ -0,0 +1,8 @@ +-----BEGIN DH PARAMETERS----- +MIIBCAKCAQEA50NOKSshXcM7Gd7krFcQ8SdAdrfaBVtoUPRTLbjTD/v36cuUMiXI +oJRa/CoZsg59iAHjkFG+LLyZnhOiUxNC/c6T6lOcdXR0an3YZEmFibfdQcoFAkiv +3xEz1rI5YALke46GTyg65EsRiaSV/auk2epo/FkYRBriOLS9I3UGAsTcnTLajCUg +YRc5jlRL6oZQ5Iy8Q+EhZkUOPoet/Qq6kamKFEiQIyaElgp5nkTOjJpLj9NsAynl +nAIo1NUzq/IHsomgcrn3Chx3CKjGviMe9EBaWAww0glqnQluyLZYbsT+DZeUB7tB +4sgK7KsiISIoP+H1NlDCxIHVvPZfMom/IwIBAg== +-----END DH PARAMETERS-----