From c1ae1462c3d0231d9095aa43f5a6430132fdf8db Mon Sep 17 00:00:00 2001 From: Brian Cunnie Date: Thu, 22 Jul 2021 22:44:32 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20Test=20both=20IPv4=20&=20IPv6=20?= =?UTF-8?q?TXT=20records?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test originally assumed the query would come from the IPv4 loopback, not the IPv6 loopback. Now I specify the protocol in the dig query to force either IPv4 or IPv6. fixes: ``` Expected : "::1" to match regular expression : 127.0.0.1 ``` --- bosh-release/src/sslip.io-dns-server/integration_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bosh-release/src/sslip.io-dns-server/integration_test.go b/bosh-release/src/sslip.io-dns-server/integration_test.go index 3a66ed1..ac9c097 100644 --- a/bosh-release/src/sslip.io-dns-server/integration_test.go +++ b/bosh-release/src/sslip.io-dns-server/integration_test.go @@ -116,9 +116,13 @@ var _ = Describe("sslip.io-dns-server", func() { `\A\z`, `TypeSRV example.com. \? nil, SOA example.com. briancunnie.gmail.com. 2021061900 900 900 1800 300\n$`), Entry("TXT is the querier's IP address when there are no custom/acme records", - "@localhost example.com txt +short", + "@localhost example.com txt +short -4", `127.0.0.1`, `TypeTXT example.com. \? \["127.0.0.1"\]`), + Entry("TXT is the querier's IP address when there are no custom/acme records", + "@localhost example.com txt +short -6", + `::1`, + `TypeTXT example.com. \? \["::1"\]`), ) }) Describe("for more complex assertions", func() {