summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2019-05-30 16:46:04 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2019-05-30 16:46:04 +0300
commit90c5d3f5c0ad42ccdb764684f721b511131e0782 (patch)
tree5ea5423e5084feee9d8d965be5e2e7bcb4a8d121 /test
parent7ad4a7670470872d78d2f552efa346a66ed4845e (diff)
downloadunit-90c5d3f5c0ad42ccdb764684f721b511131e0782.tar.gz
unit-90c5d3f5c0ad42ccdb764684f721b511131e0782.tar.bz2
Tests: adjusted skipping tests.
Diffstat (limited to '')
-rw-r--r--test/test_access_log.py2
-rw-r--r--test/test_configuration.py37
-rw-r--r--test/test_go_application.py1
-rw-r--r--test/test_node_application.py4
-rw-r--r--test/test_perl_application.py9
-rw-r--r--test/test_php_application.py3
-rw-r--r--test/test_python_application.py10
-rw-r--r--test/test_python_procman.py2
-rw-r--r--test/test_routing.py20
-rw-r--r--test/test_ruby_application.py13
-rw-r--r--test/test_settings.py2
-rw-r--r--test/test_tls.py10
12 files changed, 30 insertions, 83 deletions
diff --git a/test/test_access_log.py b/test/test_access_log.py
index e2358ce2..49497ad2 100644
--- a/test/test_access_log.py
+++ b/test/test_access_log.py
@@ -228,7 +228,7 @@ Connection: close
'partial 4',
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_access_log_partial_5(self):
self.load('empty')
diff --git a/test/test_configuration.py b/test/test_configuration.py
index 51c6f6a2..6e59c0a7 100644
--- a/test/test_configuration.py
+++ b/test/test_configuration.py
@@ -89,15 +89,8 @@ class TestConfiguration(TestControl):
def test_applications_string(self):
self.assertIn('error', self.conf('"{}"', 'applications'), 'string')
+ @unittest.skip('not yet, unsafe')
def test_applications_type_only(self):
- self.skip_alerts.extend(
- [
- r'python module is empty',
- r'failed to apply new conf',
- r'process \d+ exited on signal',
- ]
- )
-
self.assertIn(
'error',
self.conf({"app": {"type": "python"}}, 'applications'),
@@ -183,16 +176,8 @@ class TestConfiguration(TestControl):
'relative path',
)
- @unittest.expectedFailure
+ @unittest.skip('not yet, unsafe')
def test_listeners_empty(self):
- self.skip_sanitizer = True
- self.skip_alerts.extend(
- [
- r'failed to apply previous configuration',
- r'process \d+ exited on signal',
- ]
- )
-
self.assertIn(
'error', self.conf({"*:7080": {}}, 'listeners'), 'listener empty'
)
@@ -261,15 +246,8 @@ class TestConfiguration(TestControl):
'explicit ipv6',
)
+ @unittest.skip('not yet, unsafe')
def test_listeners_no_port(self):
- self.skip_alerts.extend(
- [
- r'invalid listener "127\.0\.0\.1"',
- r'failed to apply new conf',
- r'process \d+ exited on signal',
- ]
- )
-
self.assertIn(
'error',
self.conf(
@@ -308,11 +286,8 @@ class TestConfiguration(TestControl):
),
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_json_application_many(self):
- self.skip_alerts.extend(
- [r'eventfd.+failed', r'epoll.+failed', r'failed to apply']
- )
apps = 999
conf = {
@@ -335,10 +310,6 @@ class TestConfiguration(TestControl):
self.assertIn('success', self.conf(conf))
def test_json_application_many2(self):
- self.skip_alerts.extend(
- [r'eventfd.+failed', r'epoll.+failed', r'failed to apply']
- )
-
conf = {
"applications": {
"app-"
diff --git a/test/test_go_application.py b/test/test_go_application.py
index 373fcdf3..488bfdd5 100644
--- a/test/test_go_application.py
+++ b/test/test_go_application.py
@@ -1,4 +1,3 @@
-import unittest
from unit.applications.lang.go import TestApplicationGo
diff --git a/test/test_node_application.py b/test/test_node_application.py
index 901717c0..0354c978 100644
--- a/test/test_node_application.py
+++ b/test/test_node_application.py
@@ -222,7 +222,7 @@ class TestNodeApplication(TestApplicationNode):
'set header array',
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_node_application_status_message(self):
self.load('status_message')
@@ -333,7 +333,7 @@ class TestNodeApplication(TestApplicationNode):
'promise second call',
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_node_application_header_name_valid(self):
self.load('header_name_valid')
diff --git a/test/test_perl_application.py b/test/test_perl_application.py
index d77ac29d..bc26b000 100644
--- a/test/test_perl_application.py
+++ b/test/test_perl_application.py
@@ -82,7 +82,6 @@ class TestPerlApplication(TestApplicationPerl):
resp['headers']['Query-String'], '', 'query string empty'
)
- @unittest.expectedFailure
def test_perl_application_query_string_absent(self):
self.load('query_string')
@@ -93,7 +92,7 @@ class TestPerlApplication(TestApplicationPerl):
resp['headers']['Query-String'], '', 'query string absent'
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_perl_application_server_port(self):
self.load('server_port')
@@ -115,7 +114,7 @@ class TestPerlApplication(TestApplicationPerl):
'input read parts',
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_perl_application_input_read_offset(self):
self.load('input_read_offset')
@@ -184,10 +183,10 @@ class TestPerlApplication(TestApplicationPerl):
self.assertEqual(self.get()['body'], 'body\n', 'body io file')
- @unittest.expectedFailure
+ @unittest.skip('not yet, unsafe')
def test_perl_application_syntax_error(self):
self.skip_alerts.extend(
- [r'PSGI: Failed to parse script', r'process \d+ exited on signal']
+ [r'PSGI: Failed to parse script']
)
self.load('syntax_error')
diff --git a/test/test_php_application.py b/test/test_php_application.py
index 08c50075..8032e96e 100644
--- a/test/test_php_application.py
+++ b/test/test_php_application.py
@@ -84,7 +84,6 @@ class TestPHPApplication(TestApplicationPHP):
resp['headers']['Query-String'], '', 'query string empty'
)
- @unittest.expectedFailure
def test_php_application_query_string_absent(self):
self.load('query_string')
@@ -207,7 +206,7 @@ class TestPHPApplication(TestApplicationPHP):
self.get()['headers']['X-Precision'], '4', 'ini value'
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_php_application_ini_admin_user(self):
self.load('ini_precision')
diff --git a/test/test_python_application.py b/test/test_python_application.py
index 337dfcc3..3484b25e 100644
--- a/test/test_python_application.py
+++ b/test/test_python_application.py
@@ -91,7 +91,7 @@ class TestPythonApplication(TestApplicationPython):
resp['headers']['Query-String'], '', 'query string absent'
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_python_application_server_port(self):
self.load('server_port')
@@ -327,13 +327,13 @@ Connection: close
self.wait_for_record(r'At exit called\.'), 'atexit'
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_python_application_start_response_exit(self):
self.load('start_response_exit')
self.assertEqual(self.get()['status'], 500, 'start response exit')
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_python_application_input_iter(self):
self.load('input_iter')
@@ -390,7 +390,7 @@ Connection: close
self.assertEqual(resp['body'], body, 'input read length negative')
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_python_application_errors_write(self):
self.load('errors_write')
@@ -418,7 +418,7 @@ Connection: close
self.assertEqual(self.get()['body'], 'body\n', 'body io file')
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_python_application_syntax_error(self):
self.skip_alerts.append(r'Python failed to import module "wsgi"')
self.load('syntax_error')
diff --git a/test/test_python_procman.py b/test/test_python_procman.py
index 9292adcb..b0c70e53 100644
--- a/test/test_python_procman.py
+++ b/test/test_python_procman.py
@@ -133,7 +133,7 @@ class TestPythonProcman(TestApplicationPython):
self.stop_all()
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_python_prefork_same_processes(self):
self.conf('2', 'applications/' + self.app_name + '/processes')
diff --git a/test/test_routing.py b/test/test_routing.py
index 6c0afe9a..f93ccd68 100644
--- a/test/test_routing.py
+++ b/test/test_routing.py
@@ -1055,7 +1055,6 @@ class TestRouting(TestApplicationProto):
self.get(url='/%62%6c%61%68')['status'], 200, 'match uri normalize'
)
- @unittest.expectedFailure
def test_routes_match_empty_array(self):
self.assertIn(
'success',
@@ -1077,16 +1076,7 @@ class TestRouting(TestApplicationProto):
'match empty array',
)
- @unittest.expectedFailure
def test_routes_reconfigure(self):
- self.skip_sanitizer = True
- self.skip_alerts.extend(
- [
- r'failed to apply',
- r'process \d+ exited on signal',
- ]
- )
-
self.assertIn('success', self.conf([], 'routes'), 'routes redefine')
self.assertEqual(self.get()['status'], 404, 'routes redefine request')
@@ -1170,16 +1160,7 @@ class TestRouting(TestApplicationProto):
self.get()['status'], 200, 'routes redefine request 8'
)
- @unittest.expectedFailure
def test_routes_edit(self):
- self.skip_sanitizer = True
- self.skip_alerts.extend(
- [
- r'failed to apply',
- r'process \d+ exited on signal',
- ]
- )
-
self.assertIn(
'success',
self.conf(
@@ -1321,7 +1302,6 @@ class TestRouting(TestApplicationProto):
'route edit configure 9',
)
- @unittest.expectedFailure
def test_match_edit(self):
self.skip_alerts.append(r'failed to apply new conf')
diff --git a/test/test_ruby_application.py b/test/test_ruby_application.py
index f5e24e2e..67db8a8e 100644
--- a/test/test_ruby_application.py
+++ b/test/test_ruby_application.py
@@ -83,7 +83,6 @@ class TestRubyApplication(TestApplicationRuby):
resp['headers']['Query-String'], '', 'query string empty'
)
- @unittest.expectedFailure
def test_ruby_application_query_string_absent(self):
self.load('query_string')
@@ -94,7 +93,7 @@ class TestRubyApplication(TestApplicationRuby):
resp['headers']['Query-String'], '', 'query string absent'
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_ruby_application_server_port(self):
self.load('server_port')
@@ -167,7 +166,7 @@ class TestRubyApplication(TestApplicationRuby):
self.assertEqual(self.post(body=body)['body'], body, 'input each')
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_ruby_application_input_rewind(self):
self.load('input_rewind')
@@ -175,7 +174,7 @@ class TestRubyApplication(TestApplicationRuby):
self.assertEqual(self.post(body=body)['body'], body, 'input rewind')
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_ruby_application_syntax_error(self):
self.skip_alerts.extend(
[
@@ -264,7 +263,7 @@ class TestRubyApplication(TestApplicationRuby):
'header custom',
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_ruby_application_header_custom_non_printable(self):
self.load('header_custom')
@@ -277,7 +276,7 @@ class TestRubyApplication(TestApplicationRuby):
self.assertEqual(self.get()['status'], 200, 'header status')
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_ruby_application_header_rack(self):
self.load('header_rack')
@@ -300,7 +299,7 @@ class TestRubyApplication(TestApplicationRuby):
self.assertEqual(self.post(body=body)['body'], body, 'body large')
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_ruby_application_body_each_error(self):
self.load('body_each_error')
diff --git a/test/test_settings.py b/test/test_settings.py
index 47c891c9..98063440 100644
--- a/test/test_settings.py
+++ b/test/test_settings.py
@@ -215,7 +215,7 @@ Connection: close
self.post(body='012345')['status'], 413, 'status size max'
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_settings_negative_value(self):
self.assertIn(
'error',
diff --git a/test/test_tls.py b/test/test_tls.py
index 5b669ddf..f055aa24 100644
--- a/test/test_tls.py
+++ b/test/test_tls.py
@@ -89,7 +89,7 @@ class TestTLS(TestApplicationTLS):
'remove nonexistings certificate',
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_tls_certificate_update(self):
self.load('empty')
@@ -105,7 +105,7 @@ class TestTLS(TestApplicationTLS):
cert_old, self.get_server_certificate(), 'update certificate'
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_tls_certificate_key_incorrect(self):
self.load('empty')
@@ -412,7 +412,7 @@ basicConstraints = critical,CA:TRUE"""
'certificate chain intermediate server',
)
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_tls_reconfigure(self):
self.load('empty')
@@ -471,7 +471,7 @@ basicConstraints = critical,CA:TRUE"""
self.assertEqual(resp['body'], '0123456789', 'keepalive 2')
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_tls_keepalive_certificate_remove(self):
self.load('empty')
@@ -499,7 +499,7 @@ basicConstraints = critical,CA:TRUE"""
self.assertEqual(resp, None, 'keepalive remove certificate')
- @unittest.expectedFailure
+ @unittest.skip('not yet')
def test_tls_certificates_remove_all(self):
self.load('empty')