From d1cb8ab2bb27a864ec6cb21c5e64af315266100d Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Thu, 25 Aug 2022 15:50:49 +0100 Subject: Tests: added tests with abstract UNIX sockets. --- test/unit/check/unix_abstract.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/unit/check/unix_abstract.py (limited to 'test/unit/check/unix_abstract.py') diff --git a/test/unit/check/unix_abstract.py b/test/unit/check/unix_abstract.py new file mode 100644 index 00000000..5d1f629e --- /dev/null +++ b/test/unit/check/unix_abstract.py @@ -0,0 +1,25 @@ +import json + +from unit.http import TestHTTP +from unit.option import option + +http = TestHTTP() + + +def check_unix_abstract(): + available = option.available + + resp = http.put( + url='/config', + sock_type='unix', + addr=option.temp_dir + '/control.unit.sock', + body=json.dumps( + { + "listeners": {"unix:@sock": {"pass": "routes"}}, + "routes": [], + } + ), + ) + + if 'success' in resp['body']: + available['features']['unix_abstract'] = True -- cgit