Mercurial > hg > nginx-tests
comparison access_log.t @ 1217:7df2265e61be
Tests: made access_log.t pass under root user again (closes #1379).
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 08 Sep 2017 17:51:52 +0300 |
parents | a9187b424a94 |
children | 5eb82b417fd6 |
comparison
equal
deleted
inserted
replaced
1216:de7d3e249b35 | 1217:7df2265e61be |
---|---|
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 EOF | 105 EOF |
106 | 106 |
107 mkdir $t->testdir() . '/dir'; | 107 my $d = $t->testdir(); |
108 | |
109 mkdir "$d/dir"; | |
110 | |
108 $t->run(); | 111 $t->run(); |
109 | 112 |
110 ############################################################################### | 113 ############################################################################### |
111 | 114 |
112 http_get('/combined'); | 115 http_get('/combined'); |
149 http_get('/cache?logname=first'); | 152 http_get('/cache?logname=first'); |
150 http_get('/cache?logname=first'); | 153 http_get('/cache?logname=first'); |
151 http_get('/cache?logname=second'); | 154 http_get('/cache?logname=second'); |
152 http_get('/cache?logname=second'); | 155 http_get('/cache?logname=second'); |
153 | 156 |
154 chmod 0000, $t->testdir() . '/dir'; | 157 rename "$d/dir", "$d/dir_moved"; |
155 | 158 |
156 http_get('/cache?logname=lru'); | 159 http_get('/cache?logname=lru'); |
157 http_get('/cache?logname=once'); | 160 http_get('/cache?logname=once'); |
158 http_get('/cache?logname=first'); | 161 http_get('/cache?logname=first'); |
159 http_get('/cache?logname=second'); | 162 http_get('/cache?logname=second'); |
160 | 163 |
161 chmod 0755, $t->testdir() . '/dir'; | 164 rename "$d/dir_moved", "$d/dir"; |
162 | 165 |
163 # wait for file to appear with nonzero size thanks to the flush parameter | 166 # wait for file to appear with nonzero size thanks to the flush parameter |
164 | 167 |
165 for (1 .. 10) { | 168 for (1 .. 10) { |
166 last if -s $t->testdir() . '/compressed.log'; | 169 last if -s "$d/compressed.log"; |
167 select undef, undef, undef, 0.1; | 170 select undef, undef, undef, 0.1; |
168 } | 171 } |
169 | 172 |
170 # verify that "gzip" parameter turns on compression | 173 # verify that "gzip" parameter turns on compression |
171 | 174 |