Skip to content

Commit

Permalink
tests: do not generate dhparam for tests
Browse files Browse the repository at this point in the history
Tests will run much quicker if we don't need to regenerate this file. Note that this file _should not_ be used within installs.
  • Loading branch information
josegonzalez committed Dec 29, 2018
1 parent 03ed586 commit a54f672
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/nginx-vhosts/install
Original file line number Diff line number Diff line change
Expand Up @@ -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<<EOF > /etc/nginx/conf.d/dokku.conf
include $DOKKU_ROOT/*/nginx.conf;
Expand Down
6 changes: 6 additions & 0 deletions tests/ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions tests/dhparam.pem
Original file line number Diff line number Diff line change
@@ -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-----

0 comments on commit a54f672

Please sign in to comment.