Files
nginx-unit/test/unit/check/unix_abstract.py
Andrei Zeliankou ce2405ec3d Tests: prerequisites checking reworked.
Prerequisites check moved to the module level to simplify class structure.
Discovery and prerequisites checks functions moved to the separate files.
Introduced "require" fixture to provide per-test requirements check.
2023-06-12 14:16:59 +01:00

26 lines
561 B
Python

import json
from unit.http import TestHTTP
from unit.option import option
http = TestHTTP()
def check_unix_abstract():
return (
'success'
in http.put(
url='/config',
sock_type='unix',
addr=f'{option.temp_dir}/control.unit.sock',
body=json.dumps(
{
"listeners": {
f'unix:@{option.temp_dir}/sock': {"pass": "routes"}
},
"routes": [],
}
),
)['body']
)