From 0658f9bd710471229ef2518efa6590787999fd02 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Mon, 23 Apr 2018 15:26:52 +0300 Subject: Tests: added access log test with unix socket. --- test/test_access_log.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test/test_access_log.py b/test/test_access_log.py index 58497f47..a2b3287e 100644 --- a/test/test_access_log.py +++ b/test/test_access_log.py @@ -97,6 +97,26 @@ Connection: close self.search_in_log( r'::1 - - \[.+\] "GET / HTTP/1.1" 200 0 "-" "-"'), 'ipv6') + def test_access_log_unix(self): + self.load('empty') + + addr = self.testdir + '/sock' + + self.conf({ + "unix:" + addr: { + "application": "empty" + } + }, '/listeners') + + self.get(sock_type='unix', addr=addr) + + time.sleep(0.2) + + self.stop() + + self.assertIsNotNone(self.search_in_log( + r'unix: - - \[.+\] "GET / HTTP/1.1" 200 0 "-" "-"'), 'unix') + def test_access_log_referer(self): self.load('empty') -- cgit