changeset 746:f75bc412e802

Tests: unbreak access_log tests in jails. See ea574aae77cb for details. Reported by Steven Hartland, see http://mailman.nginx.org/pipermail/nginx-devel/2015-October/007393.html.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 20 Oct 2015 00:18:56 +0300
parents cdd3659d1144
children 50a0001a56f2
files access_log.t
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/access_log.t
+++ b/access_log.t
@@ -155,9 +155,11 @@ SKIP: {
 
 # verify that by default, 'combined' format is used, 'off' disables logging
 
+my $addr = IO::Socket::INET->new(LocalAddr => '127.0.0.1')->sockhost();
+
 $log = $t->read_file('combined.log');
 like($log,
-	qr!^\Q127.0.0.1 - - [\E .*
+	qr!^\Q$addr - - [\E .*
 		\Q] "GET /combined HTTP/1.0" 200 2 "-" "-"\E$!x,
 	'default log format');