summaryrefslogtreecommitdiffhomepage
path: root/test/test_tls.py
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2021-02-04 18:40:45 +0300
committerAndrei Belov <defan@nginx.com>2021-02-04 18:40:45 +0300
commit0997fa324ca523ab282f595ac9f44b3e4daff86a (patch)
tree37424fff265780f34f9a9adb7ddd7501a67843f1 /test/test_tls.py
parent2bc99c614d5547e773bda73364efada47f0a37bf (diff)
parent774a6034d9daf32ac6c98da7e4c0ca9e820536b4 (diff)
downloadunit-0997fa324ca523ab282f595ac9f44b3e4daff86a.tar.gz
unit-0997fa324ca523ab282f595ac9f44b3e4daff86a.tar.bz2
Merged with the default branch.
Diffstat (limited to 'test/test_tls.py')
-rw-r--r--test/test_tls.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/test_tls.py b/test/test_tls.py
index 4cf8d22c..89c57d07 100644
--- a/test/test_tls.py
+++ b/test/test_tls.py
@@ -4,10 +4,8 @@ import ssl
import subprocess
import pytest
-
-from conftest import option
-from conftest import skip_alert
from unit.applications.tls import TestApplicationTLS
+from unit.option import option
class TestTLS(TestApplicationTLS):
@@ -21,7 +19,7 @@ class TestTLS(TestApplicationTLS):
return self.date_to_sec_epoch(date, '%b %d %H:%M:%S %Y %Z')
def add_tls(self, application='empty', cert='default', port=7080):
- self.conf(
+ assert 'success' in self.conf(
{
"pass": "applications/" + application,
"tls": {"certificate": cert}
@@ -30,7 +28,7 @@ class TestTLS(TestApplicationTLS):
)
def remove_tls(self, application='empty', port=7080):
- self.conf(
+ assert 'success' in self.conf(
{"pass": "applications/" + application}, 'listeners/*:' + str(port)
)
@@ -479,8 +477,10 @@ basicConstraints = critical,CA:TRUE"""
read_timeout=1,
)
- self.conf({"pass": "applications/empty"}, 'listeners/*:7080')
- self.conf_delete('/certificates/default')
+ assert 'success' in self.conf(
+ {"pass": "applications/empty"}, 'listeners/*:7080'
+ )
+ assert 'success' in self.conf_delete('/certificates/default')
try:
resp = self.get_ssl(
@@ -505,12 +505,12 @@ basicConstraints = critical,CA:TRUE"""
'/certificates'
), 'remove all certificates'
- def test_tls_application_respawn(self):
+ def test_tls_application_respawn(self, skip_alert):
self.load('mirror')
self.certificate()
- self.conf('1', 'applications/mirror/processes')
+ assert 'success' in self.conf('1', 'applications/mirror/processes')
self.add_tls(application='mirror')