mirror of
https://github.com/thib8956/nginx-proxy
synced 2024-11-22 11:56:31 +00:00
Updated to use 256-bit dhparam in tests
This commit is contained in:
parent
7d253dd0f3
commit
b0de1f19d3
@ -16,12 +16,12 @@ function setup {
|
||||
--label bats-type="nginx-proxy" \
|
||||
--name $SUT_CONTAINER \
|
||||
-v /var/run/docker.sock:/tmp/docker.sock:ro \
|
||||
-e DHPARAM=256 \
|
||||
-e DHPARAM_BITS=256 \
|
||||
$SUT_IMAGE \
|
||||
&& wait_for_nginxproxy_container_to_start $SUT_CONTAINER \
|
||||
&& docker logs $SUT_CONTAINER
|
||||
|
||||
DEFAULT_HASH=$(docker exec $SUT_CONTAINER md5sum /etc/nginx/dhparam/dhparam.pem | cut -d" " -f1)
|
||||
DEFAULT_HASH=$(docker exec $SUT_CONTAINER md5sum /app/dhparam.pem.default | cut -d" " -f1)
|
||||
|
||||
assert_success
|
||||
docker_wait_for_log $SUT_CONTAINER 30 "Generating DH parameters"
|
||||
@ -29,7 +29,8 @@ function setup {
|
||||
# THEN
|
||||
docker_wait_for_log $SUT_CONTAINER 240 "dhparam generation complete, reloading nginx"
|
||||
|
||||
run docker exec $SUT_CONTAINER md5sum /etc/nginx/dhparam/dhparam.pem
|
||||
run docker exec $SUT_CONTAINER su -c "md5sum /etc/nginx/dhparam/dhparam.pem"
|
||||
|
||||
refute_output -p $DEFAULT_HASH
|
||||
}
|
||||
|
||||
@ -57,7 +58,7 @@ function setup {
|
||||
--name $SUT_CONTAINER \
|
||||
-v /var/run/docker.sock:/tmp/docker.sock:ro \
|
||||
-v $TMP_DIR:/etc/nginx/dhparam \
|
||||
-e DHPARAM=256 \
|
||||
-e DHPARAM_BITS=256 \
|
||||
$SUT_IMAGE \
|
||||
&& wait_for_nginxproxy_container_to_start $SUT_CONTAINER \
|
||||
&& docker logs $SUT_CONTAINER
|
||||
|
Loading…
Reference in New Issue
Block a user