Skip to content

Commit

Permalink
Add basic e2e tests for ipv6
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumerose committed Oct 12, 2021
1 parent 196fa74 commit 8706468
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,24 @@ var _ = Describe("dns", func() {
Expect(err).ShouldNot(HaveOccurred())
Expect(string(out)).To(ContainSubstring("Address: 192.168.127.254"))
})

It("should resolve ipv6", func() {
out, err := sshExec("nslookup ipv6.google.com")
Expect(err).ShouldNot(HaveOccurred())
Expect(string(out)).To(ContainSubstring("Address: 2a00:1450:4007:810::200e"))
})
})

var _ = Describe("ipv6", func() {
It("tcp should work", func() {
out, err := sshExec("curl ipv6.google.com")
Expect(err).ShouldNot(HaveOccurred())
Expect(string(out)).To(ContainSubstring("<!doctype html>"))
})

It("udp should work", func() {
out, err := sshExec("dig ipv6.google.com @2001:4860:4860::8888")
Expect(err).ShouldNot(HaveOccurred())
Expect(string(out)).To(ContainSubstring("opcode: QUERY, status: NOERROR"))
})
})

0 comments on commit 8706468

Please sign in to comment.