comparison access_log.t @ 616:e9f48f1e905b

Tests: avoid alert/crit error logs in access_log.t. A request would be attempted to be logged to a file path containing undefined variables, resulting in alerts with the current configuration on win32 (or crit, on unix) due to trying to open a directory as the file path for logging.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 02 Jul 2015 18:41:59 +0300
parents 907e89fba9c3
children f75bc412e802
comparison
equal deleted inserted replaced
615:f27fb891503c 616:e9f48f1e905b
81 access_log %%TESTDIR%%/multi2.log test; 81 access_log %%TESTDIR%%/multi2.log test;
82 return 200 OK; 82 return 200 OK;
83 } 83 }
84 84
85 location /varlog { 85 location /varlog {
86 access_log %%TESTDIR%%/${arg_logname} test; 86 access_log %%TESTDIR%%/varlog_${arg_logname} test;
87 return 200 OK; 87 return 200 OK;
88 } 88 }
89 } 89 }
90 } 90 }
91 91
200 is($log, "/multi:200\n", 'multiple logs 2'); 200 is($log, "/multi:200\n", 'multiple logs 2');
201 201
202 202
203 # test log destinations with variables 203 # test log destinations with variables
204 204
205 $log = $t->read_file('0'); 205 $log = $t->read_file('varlog_0');
206 is($log, "/varlog:200\n", 'varlog literal zero name'); 206 is($log, "/varlog:200\n", 'varlog literal zero name');
207 207
208 $log = $t->read_file('filename'); 208 $log = $t->read_file('varlog_filename');
209 is($log, "/varlog:200\n", 'varlog good name'); 209 is($log, "/varlog:200\n", 'varlog good name');
210 210
211 ############################################################################### 211 ###############################################################################