mirror of
https://github.com/cunnie/sslip.io.git
synced 2025-10-23 15:43:15 +08:00
ns-aws.nono.io has IPv6 Addr: 2600:1f18:aaf:6900::a
...and the NS records should reflect that. Drive-by: I removed a completely duplicated test
This commit is contained in:
@@ -140,13 +140,14 @@ var _ = Describe("sslip.io-dns-server", func() {
|
|||||||
digCmd = exec.Command("dig", strings.Split(digArgs, " ")...)
|
digCmd = exec.Command("dig", strings.Split(digArgs, " ")...)
|
||||||
digSession, err = Start(digCmd, GinkgoWriter, GinkgoWriter)
|
digSession, err = Start(digCmd, GinkgoWriter, GinkgoWriter)
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
Eventually(digSession).Should(Say(`flags: qr aa rd; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 3`))
|
Eventually(digSession).Should(Say(`flags: qr aa rd; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 4`))
|
||||||
Eventually(digSession).Should(Say(`;; ANSWER SECTION:`))
|
Eventually(digSession).Should(Say(`;; ANSWER SECTION:`))
|
||||||
Eventually(digSession).Should(Say(`ns-aws.nono.io.\n`))
|
Eventually(digSession).Should(Say(`ns-aws.nono.io.\n`))
|
||||||
Eventually(digSession).Should(Say(`ns-azure.nono.io.\n`))
|
Eventually(digSession).Should(Say(`ns-azure.nono.io.\n`))
|
||||||
Eventually(digSession).Should(Say(`ns-gce.nono.io.\n`))
|
Eventually(digSession).Should(Say(`ns-gce.nono.io.\n`))
|
||||||
Eventually(digSession).Should(Say(`;; ADDITIONAL SECTION:`))
|
Eventually(digSession).Should(Say(`;; ADDITIONAL SECTION:`))
|
||||||
Eventually(digSession).Should(Say(`ns-aws.nono.io..*52.0.56.137\n`))
|
Eventually(digSession).Should(Say(`ns-aws.nono.io..*52.0.56.137\n`))
|
||||||
|
Eventually(digSession).Should(Say(`ns-aws.nono.io..*2600:1f18:aaf:6900::a\n`))
|
||||||
Eventually(digSession).Should(Say(`ns-azure.nono.io..*52.187.42.158\n`))
|
Eventually(digSession).Should(Say(`ns-azure.nono.io..*52.187.42.158\n`))
|
||||||
Eventually(digSession).Should(Say(`ns-gce.nono.io..*104.155.144.4\n`))
|
Eventually(digSession).Should(Say(`ns-gce.nono.io..*104.155.144.4\n`))
|
||||||
Eventually(digSession, 1).Should(Exit(0))
|
Eventually(digSession, 1).Should(Exit(0))
|
||||||
@@ -165,18 +166,6 @@ var _ = Describe("sslip.io-dns-server", func() {
|
|||||||
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeTXT sslip.io. \? \["protonmail-verification=ce0ca3f5010aa7a2cf8bcc693778338ffde73e26"\], \["v=spf1 include:_spf.protonmail.ch mx ~all"\]\n`))
|
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeTXT sslip.io. \? \["protonmail-verification=ce0ca3f5010aa7a2cf8bcc693778338ffde73e26"\], \["v=spf1 include:_spf.protonmail.ch mx ~all"\]\n`))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
When(`there are multiple TXT records returned (e.g. SPF for sslip.io)`, func() {
|
|
||||||
It("returns the custom TXT records", func() {
|
|
||||||
digArgs = "@localhost sslip.io txt +short"
|
|
||||||
digCmd = exec.Command("dig", strings.Split(digArgs, " ")...)
|
|
||||||
digSession, err = Start(digCmd, GinkgoWriter, GinkgoWriter)
|
|
||||||
Expect(err).ToNot(HaveOccurred())
|
|
||||||
Eventually(digSession).Should(Say(`"protonmail-verification=ce0ca3f5010aa7a2cf8bcc693778338ffde73e26"`))
|
|
||||||
Eventually(digSession).Should(Say(`"v=spf1 include:_spf.protonmail.ch mx ~all"`))
|
|
||||||
Eventually(digSession, 1).Should(Exit(0))
|
|
||||||
Eventually(string(serverSession.Err.Contents())).Should(MatchRegexp(`TypeTXT sslip.io. \? \["protonmail-verification=ce0ca3f5010aa7a2cf8bcc693778338ffde73e26"\], \["v=spf1 include:_spf.protonmail.ch mx ~all"\]\n`))
|
|
||||||
})
|
|
||||||
})
|
|
||||||
When(`a record for an "_acme-challenge" domain is queried`, func() {
|
When(`a record for an "_acme-challenge" domain is queried`, func() {
|
||||||
When(`it's an NS record`, func() {
|
When(`it's an NS record`, func() {
|
||||||
It(`returns the NS record of the query with the "_acme-challenge." stripped`, func() {
|
It(`returns the NS record of the query with the "_acme-challenge." stripped`, func() {
|
||||||
|
@@ -83,7 +83,10 @@ var (
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
// nameserver addresses; we get queries for those every once in a while
|
// nameserver addresses; we get queries for those every once in a while
|
||||||
"ns-aws.nono.io.": {A: []dnsmessage.AResource{{A: [4]byte{52, 0, 56, 137}}}},
|
"ns-aws.nono.io.": {
|
||||||
|
A: []dnsmessage.AResource{{A: [4]byte{52, 0, 56, 137}}},
|
||||||
|
AAAA: []dnsmessage.AAAAResource{{AAAA: [16]byte{0x26, 0, 0x1f, 0x18, 0x0a, 0xaf, 0x69, 0, 0, 0, 0, 0, 0, 0, 0, 0xa}}},
|
||||||
|
},
|
||||||
"ns-azure.nono.io.": {A: []dnsmessage.AResource{{A: [4]byte{52, 187, 42, 158}}}},
|
"ns-azure.nono.io.": {A: []dnsmessage.AResource{{A: [4]byte{52, 187, 42, 158}}}},
|
||||||
"ns-gce.nono.io.": {A: []dnsmessage.AResource{{A: [4]byte{104, 155, 144, 4}}}},
|
"ns-gce.nono.io.": {A: []dnsmessage.AResource{{A: [4]byte{104, 155, 144, 4}}}},
|
||||||
// CNAMEs for sslip.io for DKIM signing
|
// CNAMEs for sslip.io for DKIM signing
|
||||||
|
Reference in New Issue
Block a user