test_tls.py (1866:483157530489) test_tls.py (1886:783946c4c90e)
1import io
2import re
3import ssl
4import subprocess
1import io
2import re
3import ssl
4import subprocess
5import time
5
6import pytest
7
8from unit.applications.tls import TestApplicationTLS
9from unit.option import option
10
11
12class TestTLS(TestApplicationTLS):

--- 483 unchanged lines hidden (view full) ---

496 'Content-Type': 'text/html',
497 },
498 sock=sock,
499 body='0123456789',
500 )
501
502 assert resp['body'] == '0123456789', 'keepalive 2'
503
6
7import pytest
8
9from unit.applications.tls import TestApplicationTLS
10from unit.option import option
11
12
13class TestTLS(TestApplicationTLS):

--- 483 unchanged lines hidden (view full) ---

497 'Content-Type': 'text/html',
498 },
499 sock=sock,
500 body='0123456789',
501 )
502
503 assert resp['body'] == '0123456789', 'keepalive 2'
504
505 def test_tls_no_close_notify(self):
506 self.certificate()
507
508 assert 'success' in self.conf(
509 {
510 "listeners": {
511 "*:7080": {
512 "pass": "routes",
513 "tls": {"certificate": "default"},
514 }
515 },
516 "routes": [{"action": {"return": 200}}],
517 "applications": {},
518 }
519 ), 'load application configuration'
520
521 (resp, sock) = self.get_ssl(start=True)
522
523 time.sleep(5)
524
525 sock.close()
526
504 @pytest.mark.skip('not yet')
505 def test_tls_keepalive_certificate_remove(self):
506 self.load('empty')
507
508 assert self.get()['status'] == 200, 'init'
509
510 self.certificate()
511

--- 133 unchanged lines hidden ---
527 @pytest.mark.skip('not yet')
528 def test_tls_keepalive_certificate_remove(self):
529 self.load('empty')
530
531 assert self.get()['status'] == 200, 'init'
532
533 self.certificate()
534

--- 133 unchanged lines hidden ---