diff options
author | Tomas Krizek <tomas.krizek@nic.cz> | 2018-12-03 13:16:01 +0100 |
---|---|---|
committer | Tomas Krizek <tomas.krizek@nic.cz> | 2018-12-04 17:13:42 +0100 |
commit | 19c1a9f22e7ded43ed7d5438d3818cdcafa76c09 (patch) | |
tree | d921e3b541209b6fbf61a0e45f31dedcd519e2ea /tests/pytests | |
parent | pytests/test_pipelining: fix issue with net.ipv6=true (diff) | |
download | knot-resolver-19c1a9f22e7ded43ed7d5438d3818cdcafa76c09.tar.xz knot-resolver-19c1a9f22e7ded43ed7d5438d3818cdcafa76c09.zip |
pytests: remove test_tls_cert_expired
Diffstat (limited to 'tests/pytests')
-rw-r--r-- | tests/pytests/README.rst | 4 | ||||
-rw-r--r-- | tests/pytests/conftest.py | 6 | ||||
-rw-r--r-- | tests/pytests/test_tls.py | 10 |
3 files changed, 2 insertions, 18 deletions
diff --git a/tests/pytests/README.rst b/tests/pytests/README.rst index 36f847e2..9a11ccd0 100644 --- a/tests/pytests/README.rst +++ b/tests/pytests/README.rst @@ -50,5 +50,5 @@ The framework provides a few useful pytest fixtures to simplify this process: It expands to 4 values (tests) - IPv4 TCP, IPv6 TCP, IPv4 TLS, IPv6 TLS sockets - `make_kresd_sock` is similar to `kresd_sock`, except it's a factory function that produces a new connected socket (of the same type) on each call -- `kresd`, `kresd_tt`, `kresd_tt_expired` are all Kresd instances, already running - and initialized with config (with no / valid / expired TLS certificates) +- `kresd`, `kresd_tt` are all Kresd instances, already running + and initialized with config (with no / valid TLS certificates) diff --git a/tests/pytests/conftest.py b/tests/pytests/conftest.py index a9d36b75..e10ba3a7 100644 --- a/tests/pytests/conftest.py +++ b/tests/pytests/conftest.py @@ -17,12 +17,6 @@ def kresd_tt(tmpdir): yield kresd -@pytest.fixture -def kresd_tt_expired(tmpdir): - with make_kresd(tmpdir, 'tt-expired') as kresd: - yield kresd - - @pytest.fixture(params=[ 'ip_tcp_socket', 'ip6_tcp_socket', diff --git a/tests/pytests/test_tls.py b/tests/pytests/test_tls.py index a32156b2..361741d5 100644 --- a/tests/pytests/test_tls.py +++ b/tests/pytests/test_tls.py @@ -42,16 +42,6 @@ def test_tls_cert_hostname_mismatch(kresd_tt, sock_family): ssock.connect(dest) -def test_tls_cert_expired(kresd_tt_expired, sock_family): - """Attempt to use expired certificate.""" - sock, dest = kresd_tt_expired.stream_socket(sock_family, tls=True) - ctx = utils.make_ssl_context(verify_location=kresd_tt_expired.tls_cert_path) - ssock = ctx.wrap_socket(sock, server_hostname='transport-test-server.com') - - with pytest.raises(ssl.SSLError): - ssock.connect(dest) - - @pytest.mark.skipif(sys.version_info < (3, 6), reason="requires python3.6 or higher") @pytest.mark.parametrize('sf1, sf2, sf3', itertools.product( |