Mercurial > hg > nginx-tests
comparison lib/Test/Nginx.pm @ 621:884b2f0c173f
Tests: tests for dumped nginx configuration ("nginx -T").
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 01 Jun 2015 14:34:36 +0300 |
parents | 7497adad1a50 |
children | 0940773278c7 |
comparison
equal
deleted
inserted
replaced
620:7497adad1a50 | 621:884b2f0c173f |
---|---|
275 | 275 |
276 $self->{_started} = 1; | 276 $self->{_started} = 1; |
277 return $self; | 277 return $self; |
278 } | 278 } |
279 | 279 |
280 sub dump_config() { | |
281 my ($self) = @_; | |
282 | |
283 my $testdir = $self->{_testdir}; | |
284 | |
285 my @globals = $self->{_test_globals} ? | |
286 () : ('-g', "pid $testdir/nginx.pid; " | |
287 . "error_log $testdir/error.log debug;"); | |
288 my $command = "$NGINX -T -p $testdir/ -c nginx.conf " | |
289 . join(' ', @globals); | |
290 | |
291 return qx/$command 2>&1/; | |
292 } | |
293 | |
280 sub waitforfile($;$) { | 294 sub waitforfile($;$) { |
281 my ($self, $file, $pid) = @_; | 295 my ($self, $file, $pid) = @_; |
282 my $exited; | 296 my $exited; |
283 | 297 |
284 # wait for file to appear | 298 # wait for file to appear |