summaryrefslogtreecommitdiffhomepage
path: root/test/test_routing.py
diff options
context:
space:
mode:
authorKonstantin Pavlov <thresh@nginx.com>2022-09-13 13:17:16 +0400
committerKonstantin Pavlov <thresh@nginx.com>2022-09-13 13:17:16 +0400
commitce964aa30b163e2b3263c5af57c1a6dae7d0cebb (patch)
tree26bf70c1a5991f6471fc4caed8628e068fdc0b7b /test/test_routing.py
parenteba4c3c98fa1bf275d94df8c727f70692ae7eae1 (diff)
parent38bd7e76a134084ab95a4ee3125af1ccd7b35864 (diff)
downloadunit-ce964aa30b163e2b3263c5af57c1a6dae7d0cebb.tar.gz
unit-ce964aa30b163e2b3263c5af57c1a6dae7d0cebb.tar.bz2
Merged with the default branch.1.28.0-1
Diffstat (limited to 'test/test_routing.py')
-rw-r--r--test/test_routing.py14
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": "::"})