comparison proxy_cache_revalidate.t @ 392:c28ecaef065f

Tests: try_run() introduced. This method replaces multiple ad-hoc solutions to grecefully skip tests if nginx startup fails, e.g., due to no support for a particular directive.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 18 Apr 2014 18:36:26 +0400
parents fb366c51eac6
children 847ea345becb
comparison
equal deleted inserted replaced
391:915ef26ac6eb 392:c28ecaef065f
65 EOF 65 EOF
66 66
67 $t->write_file('t', 'SEE-THIS'); 67 $t->write_file('t', 'SEE-THIS');
68 $t->write_file('t2', 'SEE-THIS'); 68 $t->write_file('t2', 'SEE-THIS');
69 69
70 eval { 70 $t->try_run('no proxy_cache_revalidate')->plan(9);
71 open OLDERR, ">&", \*STDERR; close STDERR;
72 $t->run();
73 open STDERR, ">&", \*OLDERR;
74 };
75 plan(skip_all => 'no proxy_cache_revalidate') if $@;
76 $t->plan(9);
77 71
78 ############################################################################### 72 ###############################################################################
79 73
80 # request documents and make sure they are cached 74 # request documents and make sure they are cached
81 75