diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2022-08-25 15:50:49 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2022-08-25 15:50:49 +0100 |
commit | d1cb8ab2bb27a864ec6cb21c5e64af315266100d (patch) | |
tree | 455d15d3fabde9f027081ec487d834a04add3d73 /test/test_configuration.py | |
parent | 7e4a8a54221adf00cd3eb45a24b633ce61400570 (diff) | |
download | unit-d1cb8ab2bb27a864ec6cb21c5e64af315266100d.tar.gz unit-d1cb8ab2bb27a864ec6cb21c5e64af315266100d.tar.bz2 |
Tests: added tests with abstract UNIX sockets.
Diffstat (limited to '')
-rw-r--r-- | test/test_configuration.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_configuration.py b/test/test_configuration.py index 4a9d9840..75fbb845 100644 --- a/test/test_configuration.py +++ b/test/test_configuration.py @@ -2,6 +2,7 @@ import socket import pytest from unit.control import TestControl +from unit.option import option class TestConfiguration(TestControl): @@ -226,6 +227,21 @@ class TestConfiguration(TestControl): {"*:7080": {"pass": "applications/app"}}, 'listeners' ), 'listeners no app' + def test_listeners_unix_abstract(self): + if option.system != 'Linux': + assert 'error' in self.conf( + {"unix:@sock": {"pass": "routes"}}, 'listeners' + ), 'unix abstract at' + + pytest.skip('not yet') + + assert 'error' in self.conf( + {"unix:\0sock": {"pass": "routes"}}, 'listeners' + ), 'unix abstract zero' + assert 'error' in self.conf( + {"unix:\u0000sock": {"pass": "routes"}}, 'listeners' + ), 'unix abstract zero unicode' + def test_listeners_addr(self): assert 'success' in self.try_addr("*:7080"), 'wildcard' assert 'success' in self.try_addr("127.0.0.1:7081"), 'explicit' |