Tests: adjusted skipping tests.

This commit is contained in:
Andrey Zelenkov
2019-05-30 16:46:04 +03:00
parent 7ad4a76704
commit 90c5d3f5c0
12 changed files with 30 additions and 83 deletions

View File

@@ -228,7 +228,7 @@ Connection: close
'partial 4',
)
@unittest.expectedFailure
@unittest.skip('not yet')
def test_access_log_partial_5(self):
self.load('empty')

View File

@@ -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-"

View File

@@ -1,4 +1,3 @@
import unittest
from unit.applications.lang.go import TestApplicationGo

View File

@@ -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')

View File

@@ -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')

View File

@@ -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')

View File

@@ -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')

View File

@@ -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')

View File

@@ -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')

View File

@@ -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')

View File

@@ -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',

View File

@@ -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')