[master] b932d06e9 Use our DNS canary in the test suite
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Fri Mar 13 08:15:10 UTC 2020
commit b932d06e924ec8a622195133fc4516020f7b9b2d
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Fri Mar 13 09:12:47 2020 +0100
Use our DNS canary in the test suite
Closes #3237
diff --git a/bin/varnishtest/tests/v00016.vtc b/bin/varnishtest/tests/v00016.vtc
index 7a0252320..6f09d10fb 100644
--- a/bin/varnishtest/tests/v00016.vtc
+++ b/bin/varnishtest/tests/v00016.vtc
@@ -85,7 +85,7 @@ varnish v1 -errvcl {Regexp compilation error:} {
varnish v1 -errvcl {resolves to too many addresses} {
backend b { .host = "127.0.0.1"; }
sub vcl_recv {
- if (remote.ip == "fastly.com") {}
+ if (remote.ip == "dns-canary-multi.varnish-cache.org") {}
}
}
diff --git a/bin/varnishtest/vtc_misc.c b/bin/varnishtest/vtc_misc.c
index dd0cd2e6f..db604ecc6 100644
--- a/bin/varnishtest/vtc_misc.c
+++ b/bin/varnishtest/vtc_misc.c
@@ -354,21 +354,21 @@ dns_works(void)
char abuf[VTCP_ADDRBUFSIZE];
char pbuf[VTCP_PORTBUFSIZE];
- sa = VSS_ResolveOne(NULL, "varnish.org", NULL,
+ sa = VSS_ResolveOne(NULL, "dns-canary.varnish-cache.org", NULL,
AF_INET, SOCK_STREAM, 0);
if (sa == NULL)
return (0);
VTCP_name(sa, abuf, sizeof abuf, pbuf, sizeof pbuf);
free(sa);
- if (strcmp(abuf, "176.58.90.154"))
+ if (strcmp(abuf, "192.0.2.255"))
return (0);
- sa = VSS_ResolveOne(NULL, "varnish.org", NULL,
+ sa = VSS_ResolveOne(NULL, "dns-canary.varnish-cache.org", NULL,
AF_INET6, SOCK_STREAM, 0);
if (sa == NULL)
- return (0);
+ return (1); /* the canary is ipv4 only */
free(sa);
- return (1);
+ return (0);
}
/* SECTION: feature feature
More information about the varnish-commit
mailing list