Skip to content

Commit

Permalink
Merge pull request nginx-proxy#970 from kamermans/bugfix/failing_ssl_…
Browse files Browse the repository at this point in the history
…tests

Fixed failing SSL tests
  • Loading branch information
jwilder authored Nov 9, 2017
2 parents 9b8323d + 612bf72 commit a6e8fae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/test_ssl/test_dhparam.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ def test_web5_dhparam_is_used(docker_compose):

host = "%s:443" % sut_container.attrs["NetworkSettings"]["IPAddress"]
r = subprocess.check_output(
"echo '' | openssl s_client -verify 0 -connect %s -cipher 'EDH' | grep 'Server Temp Key'" % host, shell=True)
"echo '' | openssl s_client -connect %s -cipher 'EDH' | grep 'Server Temp Key'" % host, shell=True)
assert "Server Temp Key: DH, 2048 bits\n" == r
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
from backports.ssl_match_hostname import CertificateError
from requests.exceptions import SSLError


@pytest.mark.parametrize("subdomain,should_redirect_to_https", [
Expand All @@ -23,7 +24,7 @@ def test_https_get_served(docker_compose, nginxproxy, subdomain):


def test_web3_https_is_500_and_SSL_validation_fails(docker_compose, nginxproxy):
with pytest.raises(CertificateError) as excinfo:
with pytest.raises( (CertificateError, SSLError) ) as excinfo:
nginxproxy.get("https://3.web.nginx-proxy.tld/port")
assert """hostname '3.web.nginx-proxy.tld' doesn't match 'nginx-proxy.tld'""" in str(excinfo.value)

Expand Down

0 comments on commit a6e8fae

Please sign in to comment.