comparison server_tokens.t @ 1251:766bcbb632ee

Tests: removed TODO and try_run() checks for legacy versions.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 24 Nov 2017 19:58:40 +0300
parents d737d6606504
children 5f46af4707e7
comparison
equal deleted inserted replaced
1250:b708848eb49a 1251:766bcbb632ee
85 } 85 }
86 } 86 }
87 87
88 EOF 88 EOF
89 89
90 $t->try_run('no server_tokens build')->plan(12); 90 $t->run()->plan(12);
91 91
92 ############################################################################### 92 ###############################################################################
93 93
94 my $re = qr/nginx\/\d+\.\d+\.\d+/; 94 my $re = qr/nginx\/\d+\.\d+\.\d+/;
95 95
105 like(http_get_server('/on/404'), $re, 'tokens on 404'); 105 like(http_get_server('/on/404'), $re, 'tokens on 404');
106 like(http_body('/on/404'), $re, 'tokens on 404 body'); 106 like(http_body('/on/404'), $re, 'tokens on 404 body');
107 107
108 $re = qr/$re \Q($1)\E/ if $t->{_configure_args} =~ /--build=(\S+)/; 108 $re = qr/$re \Q($1)\E/ if $t->{_configure_args} =~ /--build=(\S+)/;
109 109
110 TODO: {
111 local $TODO = 'not yet' unless $t->has_version('1.11.10');
112
113 like(http_get_server('/b/200'), $re, 'tokens build 200'); 110 like(http_get_server('/b/200'), $re, 'tokens build 200');
114 like(http_get_server('/b/404'), $re, 'tokens build 404'); 111 like(http_get_server('/b/404'), $re, 'tokens build 404');
115 like(http_body('/b/404'), $re, 'tokens build 404 body'); 112 like(http_body('/b/404'), $re, 'tokens build 404 body');
116
117 }
118 113
119 ############################################################################### 114 ###############################################################################
120 115
121 sub http_body { 116 sub http_body {
122 my ($uri) = shift; 117 my ($uri) = shift;