Tests: minor fixes.
This commit is contained in:
@@ -1,16 +1,17 @@
|
|||||||
import fcntl
|
import fcntl
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import pytest
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import signal
|
import signal
|
||||||
import stat
|
import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import re
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from unit.check.go import check_go
|
from unit.check.go import check_go
|
||||||
from unit.check.node import check_node
|
from unit.check.node import check_node
|
||||||
from unit.check.tls import check_openssl
|
from unit.check.tls import check_openssl
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import pytest
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import grp
|
|
||||||
import pytest
|
|
||||||
import pwd
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
import pytest
|
||||||
|
|
||||||
from conftest import skip_alert
|
from conftest import skip_alert
|
||||||
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
|
|
||||||
|
|
||||||
class TestASGIApplication(TestApplicationPython):
|
class TestASGIApplication(TestApplicationPython):
|
||||||
@@ -18,7 +17,7 @@ class TestASGIApplication(TestApplicationPython):
|
|||||||
with open(self.temp_dir + '/unit.log', 'r', errors='ignore') as f:
|
with open(self.temp_dir + '/unit.log', 'r', errors='ignore') as f:
|
||||||
return re.findall(pattern, f.read())
|
return re.findall(pattern, f.read())
|
||||||
|
|
||||||
def test_asgi_application__variables(self):
|
def test_asgi_application_variables(self):
|
||||||
self.load('variables')
|
self.load('variables')
|
||||||
|
|
||||||
body = 'Test body string.'
|
body = 'Test body string.'
|
||||||
@@ -63,7 +62,7 @@ custom-header: BLAH
|
|||||||
}, 'headers'
|
}, 'headers'
|
||||||
assert resp['body'] == body, 'body'
|
assert resp['body'] == body, 'body'
|
||||||
|
|
||||||
def test_asgi_application__query_string(self):
|
def test_asgi_application_query_string(self):
|
||||||
self.load('query_string')
|
self.load('query_string')
|
||||||
|
|
||||||
resp = self.get(url='/?var1=val1&var2=val2')
|
resp = self.get(url='/?var1=val1&var2=val2')
|
||||||
@@ -72,7 +71,7 @@ custom-header: BLAH
|
|||||||
resp['headers']['query-string'] == 'var1=val1&var2=val2'
|
resp['headers']['query-string'] == 'var1=val1&var2=val2'
|
||||||
), 'query-string header'
|
), 'query-string header'
|
||||||
|
|
||||||
def test_asgi_application__query_string_space(self):
|
def test_asgi_application_query_string_space(self):
|
||||||
self.load('query_string')
|
self.load('query_string')
|
||||||
|
|
||||||
resp = self.get(url='/ ?var1=val1&var2=val2')
|
resp = self.get(url='/ ?var1=val1&var2=val2')
|
||||||
@@ -95,7 +94,7 @@ custom-header: BLAH
|
|||||||
resp['headers']['query-string'] == ' var1= val1 & var2=val2'
|
resp['headers']['query-string'] == ' var1= val1 & var2=val2'
|
||||||
), 'query-string space 4'
|
), 'query-string space 4'
|
||||||
|
|
||||||
def test_asgi_application__query_string_empty(self):
|
def test_asgi_application_query_string_empty(self):
|
||||||
self.load('query_string')
|
self.load('query_string')
|
||||||
|
|
||||||
resp = self.get(url='/?')
|
resp = self.get(url='/?')
|
||||||
@@ -103,7 +102,7 @@ custom-header: BLAH
|
|||||||
assert resp['status'] == 200, 'query string empty status'
|
assert resp['status'] == 200, 'query string empty status'
|
||||||
assert resp['headers']['query-string'] == '', 'query string empty'
|
assert resp['headers']['query-string'] == '', 'query string empty'
|
||||||
|
|
||||||
def test_asgi_application__query_string_absent(self):
|
def test_asgi_application_query_string_absent(self):
|
||||||
self.load('query_string')
|
self.load('query_string')
|
||||||
|
|
||||||
resp = self.get()
|
resp = self.get()
|
||||||
@@ -112,7 +111,7 @@ custom-header: BLAH
|
|||||||
assert resp['headers']['query-string'] == '', 'query string absent'
|
assert resp['headers']['query-string'] == '', 'query string absent'
|
||||||
|
|
||||||
@pytest.mark.skip('not yet')
|
@pytest.mark.skip('not yet')
|
||||||
def test_asgi_application__server_port(self):
|
def test_asgi_application_server_port(self):
|
||||||
self.load('server_port')
|
self.load('server_port')
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
@@ -120,7 +119,7 @@ custom-header: BLAH
|
|||||||
), 'Server-Port header'
|
), 'Server-Port header'
|
||||||
|
|
||||||
@pytest.mark.skip('not yet')
|
@pytest.mark.skip('not yet')
|
||||||
def test_asgi_application__working_directory_invalid(self):
|
def test_asgi_application_working_directory_invalid(self):
|
||||||
self.load('empty')
|
self.load('empty')
|
||||||
|
|
||||||
assert 'success' in self.conf(
|
assert 'success' in self.conf(
|
||||||
@@ -129,14 +128,14 @@ custom-header: BLAH
|
|||||||
|
|
||||||
assert self.get()['status'] == 500, 'status'
|
assert self.get()['status'] == 500, 'status'
|
||||||
|
|
||||||
def test_asgi_application__204_transfer_encoding(self):
|
def test_asgi_application_204_transfer_encoding(self):
|
||||||
self.load('204_no_content')
|
self.load('204_no_content')
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
'Transfer-Encoding' not in self.get()['headers']
|
'Transfer-Encoding' not in self.get()['headers']
|
||||||
), '204 header transfer encoding'
|
), '204 header transfer encoding'
|
||||||
|
|
||||||
def test_asgi_application__shm_ack_handle(self):
|
def test_asgi_application_shm_ack_handle(self):
|
||||||
self.load('mirror')
|
self.load('mirror')
|
||||||
|
|
||||||
# Minimum possible limit
|
# Minimum possible limit
|
||||||
@@ -379,7 +378,7 @@ Connection: close
|
|||||||
|
|
||||||
self.get(headers=headers_delay_1)
|
self.get(headers=headers_delay_1)
|
||||||
|
|
||||||
def test_asgi_application__loading_error(self):
|
def test_asgi_application_loading_error(self):
|
||||||
skip_alert(r'Python failed to import module "blah"')
|
skip_alert(r'Python failed to import module "blah"')
|
||||||
|
|
||||||
self.load('empty')
|
self.load('empty')
|
||||||
@@ -388,7 +387,7 @@ Connection: close
|
|||||||
|
|
||||||
assert self.get()['status'] == 503, 'loading error'
|
assert self.get()['status'] == 503, 'loading error'
|
||||||
|
|
||||||
def test_asgi_application__threading(self):
|
def test_asgi_application_threading(self):
|
||||||
"""wait_for_record() timeouts after 5s while every thread works at
|
"""wait_for_record() timeouts after 5s while every thread works at
|
||||||
least 3s. So without releasing GIL test should fail.
|
least 3s. So without releasing GIL test should fail.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
import os
|
import os
|
||||||
import pytest
|
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from conftest import option
|
||||||
|
from conftest import public_dir
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
from conftest import option, public_dir
|
|
||||||
|
|
||||||
|
|
||||||
class TestASGILifespan(TestApplicationPython):
|
class TestASGILifespan(TestApplicationPython):
|
||||||
@@ -19,11 +21,16 @@ class TestASGILifespan(TestApplicationPython):
|
|||||||
shutdown_path = option.test_dir + '/python/lifespan/empty/shutdown'
|
shutdown_path = option.test_dir + '/python/lifespan/empty/shutdown'
|
||||||
version_path = option.test_dir + '/python/lifespan/empty/version'
|
version_path = option.test_dir + '/python/lifespan/empty/version'
|
||||||
|
|
||||||
open(startup_path, 'a').close()
|
os.chmod(option.test_dir + '/python/lifespan/empty', 0o777)
|
||||||
open(shutdown_path, 'a').close()
|
|
||||||
open(version_path, 'a').close()
|
|
||||||
|
|
||||||
public_dir(option.test_dir + '/python/lifespan/empty')
|
open(startup_path, 'a').close()
|
||||||
|
os.chmod(startup_path, 0o777)
|
||||||
|
|
||||||
|
open(shutdown_path, 'a').close()
|
||||||
|
os.chmod(shutdown_path, 0o777)
|
||||||
|
|
||||||
|
open(version_path, 'a').close()
|
||||||
|
os.chmod(version_path, 0o777)
|
||||||
|
|
||||||
assert self.get()['status'] == 204
|
assert self.get()['status'] == 204
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
import pytest
|
|
||||||
import struct
|
import struct
|
||||||
import time
|
import time
|
||||||
from distutils.version import LooseVersion
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from conftest import option
|
||||||
|
from conftest import skip_alert
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
from unit.applications.websockets import TestApplicationWebsocket
|
from unit.applications.websockets import TestApplicationWebsocket
|
||||||
from conftest import option, skip_alert
|
|
||||||
|
|
||||||
|
|
||||||
class TestASGIWebsockets(TestApplicationPython):
|
class TestASGIWebsockets(TestApplicationPython):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from unit.control import TestControl
|
|
||||||
from conftest import skip_alert
|
from conftest import skip_alert
|
||||||
|
from unit.control import TestControl
|
||||||
|
|
||||||
|
|
||||||
class TestConfiguration(TestControl):
|
class TestConfiguration(TestControl):
|
||||||
@@ -15,7 +15,7 @@ class TestConfiguration(TestControl):
|
|||||||
|
|
||||||
def test_json_unicode(self):
|
def test_json_unicode(self):
|
||||||
assert 'success' in self.conf(
|
assert 'success' in self.conf(
|
||||||
b"""
|
u"""
|
||||||
{
|
{
|
||||||
"ap\u0070": {
|
"ap\u0070": {
|
||||||
"type": "\u0070ython",
|
"type": "\u0070ython",
|
||||||
@@ -53,8 +53,8 @@ class TestConfiguration(TestControl):
|
|||||||
assert 'приложение' in self.conf_get('applications'), 'unicode 2 get'
|
assert 'приложение' in self.conf_get('applications'), 'unicode 2 get'
|
||||||
|
|
||||||
def test_json_unicode_number(self):
|
def test_json_unicode_number(self):
|
||||||
assert 'error' in self.conf(
|
assert 'success' in self.conf(
|
||||||
b"""
|
u"""
|
||||||
{
|
{
|
||||||
"app": {
|
"app": {
|
||||||
"type": "python",
|
"type": "python",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from unit.applications.lang.go import TestApplicationGo
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from unit.applications.lang.go import TestApplicationGo
|
||||||
|
|
||||||
|
|
||||||
class TestGoApplication(TestApplicationGo):
|
class TestGoApplication(TestApplicationGo):
|
||||||
prerequisites = {'modules': {'go': 'all'}}
|
prerequisites = {'modules': {'go': 'all'}}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import grp
|
import grp
|
||||||
import os
|
import os
|
||||||
import pwd
|
import pwd
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from unit.applications.lang.go import TestApplicationGo
|
from unit.applications.lang.go import TestApplicationGo
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from unit.applications.lang.go import TestApplicationGo
|
from unit.applications.lang.go import TestApplicationGo
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class TestHTTPHeader(TestApplicationPython):
|
|||||||
resp = self.get(
|
resp = self.get(
|
||||||
headers={
|
headers={
|
||||||
'Host': 'localhost',
|
'Host': 'localhost',
|
||||||
'Custom-Header': '(),/:;<=>?@[\]{}\t !#$%&\'*+-.^_`|~',
|
'Custom-Header': r'(),/:;<=>?@[\]{}\t !#$%&\'*+-.^_`|~',
|
||||||
'Connection': 'close',
|
'Connection': 'close',
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -116,7 +116,7 @@ class TestHTTPHeader(TestApplicationPython):
|
|||||||
assert resp['status'] == 200, 'value chars status'
|
assert resp['status'] == 200, 'value chars status'
|
||||||
assert (
|
assert (
|
||||||
resp['headers']['Custom-Header']
|
resp['headers']['Custom-Header']
|
||||||
== '(),/:;<=>?@[\]{}\t !#$%&\'*+-.^_`|~'
|
== r'(),/:;<=>?@[\]{}\t !#$%&\'*+-.^_`|~'
|
||||||
), 'value chars custom header'
|
), 'value chars custom header'
|
||||||
|
|
||||||
def test_http_header_value_chars_edge(self):
|
def test_http_header_value_chars_edge(self):
|
||||||
|
|||||||
@@ -3,8 +3,10 @@ import os
|
|||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from conftest import option
|
||||||
|
from conftest import public_dir
|
||||||
|
from conftest import skip_alert
|
||||||
from unit.applications.lang.java import TestApplicationJava
|
from unit.applications.lang.java import TestApplicationJava
|
||||||
from conftest import option, public_dir, skip_alert
|
|
||||||
|
|
||||||
class TestJavaApplication(TestApplicationJava):
|
class TestJavaApplication(TestApplicationJava):
|
||||||
prerequisites = {'modules': {'java': 'all'}}
|
prerequisites = {'modules': {'java': 'all'}}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from unit.applications.lang.java import TestApplicationJava
|
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.lang.java import TestApplicationJava
|
||||||
|
|
||||||
|
|
||||||
class TestJavaIsolationRootfs(TestApplicationJava):
|
class TestJavaIsolationRootfs(TestApplicationJava):
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import pytest
|
|
||||||
import struct
|
import struct
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from conftest import option
|
||||||
|
from conftest import skip_alert
|
||||||
from unit.applications.lang.java import TestApplicationJava
|
from unit.applications.lang.java import TestApplicationJava
|
||||||
from unit.applications.websockets import TestApplicationWebsocket
|
from unit.applications.websockets import TestApplicationWebsocket
|
||||||
from conftest import option, skip_alert
|
|
||||||
|
|
||||||
|
|
||||||
class TestJavaWebsockets(TestApplicationJava):
|
class TestJavaWebsockets(TestApplicationJava):
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import pytest
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from unit.applications.lang.node import TestApplicationNode
|
import pytest
|
||||||
|
|
||||||
from conftest import waitforfiles
|
from conftest import waitforfiles
|
||||||
|
from unit.applications.lang.node import TestApplicationNode
|
||||||
|
|
||||||
|
|
||||||
class TestNodeApplication(TestApplicationNode):
|
class TestNodeApplication(TestApplicationNode):
|
||||||
@@ -50,8 +51,8 @@ class TestNodeApplication(TestApplicationNode):
|
|||||||
raw_headers = headers.pop('Request-Raw-Headers')
|
raw_headers = headers.pop('Request-Raw-Headers')
|
||||||
assert re.search(
|
assert re.search(
|
||||||
r'^(?:Host|localhost|Content-Type|'
|
r'^(?:Host|localhost|Content-Type|'
|
||||||
'text\/html|Custom-Header|blah|Content-Length|17|Connection|'
|
r'text\/html|Custom-Header|blah|Content-Length|17|Connection|'
|
||||||
'close|,)+$',
|
r'close|,)+$',
|
||||||
raw_headers,
|
raw_headers,
|
||||||
), 'raw headers'
|
), 'raw headers'
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import pytest
|
|
||||||
import struct
|
import struct
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from conftest import option
|
||||||
|
from conftest import skip_alert
|
||||||
from unit.applications.lang.node import TestApplicationNode
|
from unit.applications.lang.node import TestApplicationNode
|
||||||
from unit.applications.websockets import TestApplicationWebsocket
|
from unit.applications.websockets import TestApplicationWebsocket
|
||||||
from conftest import option, skip_alert
|
|
||||||
|
|
||||||
|
|
||||||
class TestNodeWebsockets(TestApplicationNode):
|
class TestNodeWebsockets(TestApplicationNode):
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import pytest
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from unit.applications.lang.perl import TestApplicationPerl
|
import pytest
|
||||||
|
|
||||||
from conftest import skip_alert
|
from conftest import skip_alert
|
||||||
|
from unit.applications.lang.perl import TestApplicationPerl
|
||||||
|
|
||||||
|
|
||||||
class TestPerlApplication(TestApplicationPerl):
|
class TestPerlApplication(TestApplicationPerl):
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import os
|
import os
|
||||||
import pytest
|
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from unit.applications.lang.php import TestApplicationPHP
|
import pytest
|
||||||
|
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.lang.php import TestApplicationPHP
|
||||||
|
|
||||||
class TestPHPApplication(TestApplicationPHP):
|
class TestPHPApplication(TestApplicationPHP):
|
||||||
prerequisites = {'modules': {'php': 'all'}}
|
prerequisites = {'modules': {'php': 'all'}}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from conftest import option
|
||||||
from unit.applications.lang.php import TestApplicationPHP
|
from unit.applications.lang.php import TestApplicationPHP
|
||||||
from unit.feature.isolation import TestFeatureIsolation
|
from unit.feature.isolation import TestFeatureIsolation
|
||||||
from conftest import option
|
|
||||||
|
|
||||||
|
|
||||||
class TestPHPIsolation(TestApplicationPHP):
|
class TestPHPIsolation(TestApplicationPHP):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from unit.applications.lang.php import TestApplicationPHP
|
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.lang.php import TestApplicationPHP
|
||||||
|
|
||||||
|
|
||||||
class TestPHPTargets(TestApplicationPHP):
|
class TestPHPTargets(TestApplicationPHP):
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import pytest
|
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from conftest import option
|
||||||
|
from conftest import skip_alert
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
from conftest import option, skip_alert
|
|
||||||
|
|
||||||
|
|
||||||
class TestProxy(TestApplicationPython):
|
class TestProxy(TestApplicationPython):
|
||||||
@@ -215,7 +217,7 @@ Content-Length: 10
|
|||||||
== header_value
|
== header_value
|
||||||
), 'custom header'
|
), 'custom header'
|
||||||
|
|
||||||
header_value = '(),/:;<=>?@[\]{}\t !#$%&\'*+-.^_`|~'
|
header_value = r'(),/:;<=>?@[\]{}\t !#$%&\'*+-.^_`|~'
|
||||||
assert (
|
assert (
|
||||||
self.get_http10(
|
self.get_http10(
|
||||||
headers={'Host': 'localhost', 'Custom-Header': header_value}
|
headers={'Host': 'localhost', 'Custom-Header': header_value}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class TestProxyChunked(TestApplicationPython):
|
|||||||
|
|
||||||
for line in re.split('\r\n', body):
|
for line in re.split('\r\n', body):
|
||||||
add = ''
|
add = ''
|
||||||
m1 = re.search('(.*)\sX\s(\d+)', line)
|
m1 = re.search(r'(.*)\sX\s(\d+)', line)
|
||||||
|
|
||||||
if m1 is not None:
|
if m1 is not None:
|
||||||
add = m1.group(1) * int(m1.group(2))
|
add = m1.group(1) * int(m1.group(2))
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import grp
|
import grp
|
||||||
import pytest
|
|
||||||
import pwd
|
import pwd
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
import pytest
|
||||||
|
|
||||||
from conftest import skip_alert
|
from conftest import skip_alert
|
||||||
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
|
|
||||||
|
|
||||||
class TestPythonApplication(TestApplicationPython):
|
class TestPythonApplication(TestApplicationPython):
|
||||||
|
|||||||
@@ -94,4 +94,3 @@ class TestPythonIsolation(TestApplicationPython):
|
|||||||
self.load('empty', isolation=isolation)
|
self.load('empty', isolation=isolation)
|
||||||
|
|
||||||
assert (self.get()['status'] == 200), 'enabled language_deps'
|
assert (self.get()['status'] == 200), 'enabled language_deps'
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import pytest
|
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import re
|
|||||||
import subprocess
|
import subprocess
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
|
||||||
from conftest import skip_alert
|
from conftest import skip_alert
|
||||||
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
|
|
||||||
|
|
||||||
class TestRespawn(TestApplicationPython):
|
class TestRespawn(TestApplicationPython):
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from conftest import option
|
||||||
|
from conftest import skip_alert
|
||||||
from unit.applications.proto import TestApplicationProto
|
from unit.applications.proto import TestApplicationProto
|
||||||
from conftest import option, skip_alert
|
|
||||||
|
|
||||||
|
|
||||||
class TestRouting(TestApplicationProto):
|
class TestRouting(TestApplicationProto):
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import pytest
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from unit.applications.lang.ruby import TestApplicationRuby
|
import pytest
|
||||||
|
|
||||||
from conftest import skip_alert
|
from conftest import skip_alert
|
||||||
|
from unit.applications.lang.ruby import TestApplicationRuby
|
||||||
|
|
||||||
|
|
||||||
class TestRubyApplication(TestApplicationRuby):
|
class TestRubyApplication(TestApplicationRuby):
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import os
|
|
||||||
import pytest
|
|
||||||
import shutil
|
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from conftest import option
|
||||||
from unit.applications.lang.ruby import TestApplicationRuby
|
from unit.applications.lang.ruby import TestApplicationRuby
|
||||||
from unit.feature.isolation import TestFeatureIsolation
|
from unit.feature.isolation import TestFeatureIsolation
|
||||||
from conftest import option
|
|
||||||
|
|
||||||
|
|
||||||
class TestRubyIsolation(TestApplicationRuby):
|
class TestRubyIsolation(TestApplicationRuby):
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import pytest
|
import re
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
import re
|
|
||||||
|
|
||||||
|
|
||||||
class TestSettings(TestApplicationPython):
|
class TestSettings(TestApplicationPython):
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from unit.applications.proto import TestApplicationProto
|
|
||||||
from conftest import skip_alert
|
from conftest import skip_alert
|
||||||
|
from unit.applications.proto import TestApplicationProto
|
||||||
|
|
||||||
|
|
||||||
class TestStatic(TestApplicationProto):
|
class TestStatic(TestApplicationProto):
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import os
|
import os
|
||||||
import pytest
|
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
from unit.applications.proto import TestApplicationProto
|
import pytest
|
||||||
|
|
||||||
from conftest import waitforfiles
|
from conftest import waitforfiles
|
||||||
|
from unit.applications.proto import TestApplicationProto
|
||||||
|
|
||||||
|
|
||||||
class TestStatic(TestApplicationProto):
|
class TestStatic(TestApplicationProto):
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import io
|
import io
|
||||||
import pytest
|
|
||||||
import re
|
import re
|
||||||
import ssl
|
import ssl
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from unit.applications.tls import TestApplicationTLS
|
import pytest
|
||||||
|
|
||||||
from conftest import skip_alert
|
from conftest import skip_alert
|
||||||
|
from unit.applications.tls import TestApplicationTLS
|
||||||
|
|
||||||
|
|
||||||
class TestTLS(TestApplicationTLS):
|
class TestTLS(TestApplicationTLS):
|
||||||
@@ -527,7 +528,7 @@ basicConstraints = critical,CA:TRUE"""
|
|||||||
|
|
||||||
self.wait_for_record(
|
self.wait_for_record(
|
||||||
re.compile(
|
re.compile(
|
||||||
' (?!' + app_id + '#)(\d+)#\d+ "mirror" application started'
|
r' (?!' + app_id + r'#)(\d+)#\d+ "mirror" application started'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
|
|
||||||
|
|
||||||
class TestUpstreamsRR(TestApplicationPython):
|
class TestUpstreamsRR(TestApplicationPython):
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import os
|
import os
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
|
|
||||||
from unit.applications.lang.python import TestApplicationPython
|
|
||||||
from conftest import waitforfiles
|
from conftest import waitforfiles
|
||||||
|
from unit.applications.lang.python import TestApplicationPython
|
||||||
|
|
||||||
|
|
||||||
class TestUSR1(TestApplicationPython):
|
class TestUSR1(TestApplicationPython):
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from unit.applications.proto import TestApplicationProto
|
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.proto import TestApplicationProto
|
||||||
|
|
||||||
|
|
||||||
class TestApplicationGo(TestApplicationProto):
|
class TestApplicationGo(TestApplicationProto):
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
import pytest
|
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from unit.applications.proto import TestApplicationProto
|
import pytest
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.proto import TestApplicationProto
|
||||||
|
|
||||||
|
|
||||||
class TestApplicationJava(TestApplicationProto):
|
class TestApplicationJava(TestApplicationProto):
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import os
|
|
||||||
import shutil
|
import shutil
|
||||||
from urllib.parse import quote
|
from urllib.parse import quote
|
||||||
|
|
||||||
|
from conftest import option
|
||||||
|
from conftest import public_dir
|
||||||
from unit.applications.proto import TestApplicationProto
|
from unit.applications.proto import TestApplicationProto
|
||||||
from conftest import option, public_dir
|
|
||||||
|
|
||||||
|
|
||||||
class TestApplicationNode(TestApplicationProto):
|
class TestApplicationNode(TestApplicationProto):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from unit.applications.proto import TestApplicationProto
|
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.proto import TestApplicationProto
|
||||||
|
|
||||||
|
|
||||||
class TestApplicationPerl(TestApplicationProto):
|
class TestApplicationPerl(TestApplicationProto):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from unit.applications.proto import TestApplicationProto
|
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.proto import TestApplicationProto
|
||||||
|
|
||||||
|
|
||||||
class TestApplicationPHP(TestApplicationProto):
|
class TestApplicationPHP(TestApplicationProto):
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import pytest
|
|
||||||
|
|
||||||
from unit.applications.proto import TestApplicationProto
|
|
||||||
from urllib.parse import quote
|
from urllib.parse import quote
|
||||||
|
|
||||||
|
import pytest
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.proto import TestApplicationProto
|
||||||
|
|
||||||
|
|
||||||
class TestApplicationPython(TestApplicationProto):
|
class TestApplicationPython(TestApplicationProto):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from unit.applications.proto import TestApplicationProto
|
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.proto import TestApplicationProto
|
||||||
|
|
||||||
|
|
||||||
class TestApplicationRuby(TestApplicationProto):
|
class TestApplicationRuby(TestApplicationProto):
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import os
|
|||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from unit.control import TestControl
|
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.control import TestControl
|
||||||
|
|
||||||
|
|
||||||
class TestApplicationProto(TestControl):
|
class TestApplicationProto(TestControl):
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import ssl
|
import ssl
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from unit.applications.proto import TestApplicationProto
|
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.applications.proto import TestApplicationProto
|
||||||
|
|
||||||
|
|
||||||
class TestApplicationTLS(TestApplicationProto):
|
class TestApplicationTLS(TestApplicationProto):
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
import base64
|
import base64
|
||||||
import hashlib
|
import hashlib
|
||||||
import itertools
|
import itertools
|
||||||
import pytest
|
|
||||||
import random
|
import random
|
||||||
import re
|
|
||||||
import select
|
import select
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
|
import pytest
|
||||||
from unit.applications.proto import TestApplicationProto
|
from unit.applications.proto import TestApplicationProto
|
||||||
|
|
||||||
GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
|
GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import binascii
|
|||||||
import io
|
import io
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import pytest
|
|
||||||
import re
|
import re
|
||||||
import select
|
import select
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from unit.main import TestUnit
|
import pytest
|
||||||
from conftest import option
|
from conftest import option
|
||||||
|
from unit.main import TestUnit
|
||||||
|
|
||||||
|
|
||||||
class TestHTTP(TestUnit):
|
class TestHTTP(TestUnit):
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
import argparse
|
|
||||||
import atexit
|
import atexit
|
||||||
import os
|
import os
|
||||||
import platform
|
|
||||||
import pytest
|
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import signal
|
import signal
|
||||||
import stat
|
import stat
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
from conftest import option, public_dir, waitforfiles, _check_alerts, _print_log
|
|
||||||
from multiprocessing import Process
|
from multiprocessing import Process
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from conftest import _check_alerts
|
||||||
|
from conftest import _print_log
|
||||||
|
from conftest import option
|
||||||
|
from conftest import public_dir
|
||||||
|
from conftest import waitforfiles
|
||||||
|
|
||||||
|
|
||||||
class TestUnit():
|
class TestUnit():
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user