mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-07 08:31:02 +08:00
🐞 Test both IPv4 & IPv6 TXT records
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 <string>: "::1" to match regular expression <string>: 127.0.0.1 ```
This commit is contained in:
@@ -116,9 +116,13 @@ var _ = Describe("sslip.io-dns-server", func() {
|
|||||||
`\A\z`,
|
`\A\z`,
|
||||||
`TypeSRV example.com. \? nil, SOA example.com. briancunnie.gmail.com. 2021061900 900 900 1800 300\n$`),
|
`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",
|
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`,
|
`127.0.0.1`,
|
||||||
`TypeTXT example.com. \? \["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() {
|
Describe("for more complex assertions", func() {
|
||||||
|
Reference in New Issue
Block a user