diff options
author | Andrei Zeliankou <zelenkov@nginx.com> | 2022-08-08 10:32:24 +0100 |
---|---|---|
committer | Andrei Zeliankou <zelenkov@nginx.com> | 2022-08-08 10:32:24 +0100 |
commit | e5d835e1593389b1490def9ec9c031156e2a74a4 (patch) | |
tree | fd3d057e99d958d6eb648d9c7b676428e6d3d38b /test/test_routing.py | |
parent | 418bc208d08dbc4a0a3511e503c946ab6ac71c39 (diff) | |
download | unit-e5d835e1593389b1490def9ec9c031156e2a74a4.tar.gz unit-e5d835e1593389b1490def9ec9c031156e2a74a4.tar.bz2 |
Tests: added tests with UNIX sockets in "source".
Diffstat (limited to '')
-rw-r--r-- | test/test_routing.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/test_routing.py b/test/test_routing.py index fda429a4..3649b37c 100644 --- a/test/test_routing.py +++ b/test/test_routing.py @@ -1723,18 +1723,26 @@ class TestRouting(TestApplicationPython): addr = temp_dir + '/sock' assert 'success' in self.conf( - {"unix:" + addr: {"pass": "routes"}}, 'listeners' + { + "127.0.0.1:7081": {"pass": "routes"}, + "unix:" + addr: {"pass": "routes"}, + }, + 'listeners', ), 'source listeners configure' self.route_match({"source": "!0.0.0.0/0"}) assert ( self.get(sock_type='unix', addr=addr)['status'] == 200 - ), 'unix ipv4' + ), 'unix ipv4 neg' self.route_match({"source": "!::/0"}) assert ( self.get(sock_type='unix', addr=addr)['status'] == 200 - ), 'unix ipv6' + ), 'unix ipv6 neg' + + self.route_match({"source": "unix"}) + assert self.get(port=7081)['status'] == 404, 'unix ipv4' + assert self.get(sock_type='unix', addr=addr)['status'] == 200, 'unix' def test_routes_match_source(self): self.route_match({"source": "::"}) |