Repository navigation
Commit a9abc49
committed
tests: resolve through the local dnsmasq cache in CI.
23ab627 added the cache but dropped the TEST_NGINX_RESOLVER export along
with it, so nothing points the tests at 127.0.0.1 any more. Every test file
carries its own default:
$ENV{TEST_NGINX_RESOLVER} ||= '8.8.8.8';
so nginx's resolver directive goes straight out to a public resolver and
the cache only ever serves the warm-up digs. Public resolvers do not answer
"localhost" -- RFC 6761 leaves that to the stub resolver -- which is why
t/014-bugs.t TEST 37 and t/058-tcp-socket.t TEST 4 fail with "Host not
found".
Export TEST_NGINX_RESOLVER=127.0.0.1 so queries go through the cache, move
dnsmasq to 127.0.0.1:53, and answer "localhost" from --host-record since
--no-hosts keeps /etc/hosts out. Port 53 keeps the resolver addressable as
a bare IP, which t/087-udp-socket.t TEST 10 needs: it passes
$TEST_NGINX_RESOLVER to setpeername() with port 53. systemd-resolved's stub
listener owns 127.0.0.53:53 only, and --bind-interfaces keeps dnsmasq off
every other address.1 parent fdbfc9e commit a9abc49
1 file changed
Lines changed: 25 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
| 208 | + | |
202 | 209 | | |
203 | 210 | | |
204 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
205 | 216 | | |
206 | 217 | | |
207 | 218 | | |
208 | | - | |
| 219 | + | |
209 | 220 | | |
210 | 221 | | |
211 | 222 | | |
| |||
278 | 289 | | |
279 | 290 | | |
280 | 291 | | |
281 | | - | |
282 | | - | |
283 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
284 | 301 | | |
285 | 302 | | |
0 commit comments