Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-namesys
Commits
2ae3baed
Commit
2ae3baed
authored
Apr 21, 2021
by
Marcin Rataj
Committed by
vyzo
Apr 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: non-ICANN DNS names
parent
1f2af4e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
dns_test.go
dns_test.go
+12
-0
No files found.
dns_test.go
View file @
2ae3baed
...
...
@@ -127,6 +127,15 @@ func newMockDNS() *mockDNS {
"fqdn.example.com."
:
{
"dnslink=/ipfs/QmYvMB9yrsSf7RKBghkfwmHJkzJhW2ZgVwq3LxBXXPasFr"
,
},
"en.wikipedia-on-ipfs.org."
:
{
"dnslink=/ipfs/bafybeiaysi4s6lnjev27ln5icwm6tueaw2vdykrtjkwiphwekaywqhcjze"
,
},
"custom.non-icann.tldextravaganza."
:
{
"dnslink=/ipfs/bafybeieto6mcuvqlechv4iadoqvnffondeiwxc2bcfcewhvpsd2odvbmvm"
,
},
"singlednslabelshouldbeok."
:
{
"dnslink=/ipfs/bafybeih4a6ylafdki6ailjrdvmr7o4fbbeceeeuty4v3qyyouiz5koqlpi"
,
},
"www.wealdtech.eth."
:
{
"dnslink=/ipns/ipfs.example.com"
,
},
...
...
@@ -167,6 +176,9 @@ func TestDNSResolution(t *testing.T) {
testResolution
(
t
,
r
,
"double.example.com"
,
opts
.
DefaultDepthLimit
,
"/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD"
,
nil
)
testResolution
(
t
,
r
,
"conflict.example.com"
,
opts
.
DefaultDepthLimit
,
"/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjE"
,
nil
)
testResolution
(
t
,
r
,
"fqdn.example.com."
,
opts
.
DefaultDepthLimit
,
"/ipfs/QmYvMB9yrsSf7RKBghkfwmHJkzJhW2ZgVwq3LxBXXPasFr"
,
nil
)
testResolution
(
t
,
r
,
"en.wikipedia-on-ipfs.org"
,
2
,
"/ipfs/bafybeiaysi4s6lnjev27ln5icwm6tueaw2vdykrtjkwiphwekaywqhcjze"
,
nil
)
testResolution
(
t
,
r
,
"custom.non-icann.tldextravaganza."
,
2
,
"/ipfs/bafybeieto6mcuvqlechv4iadoqvnffondeiwxc2bcfcewhvpsd2odvbmvm"
,
nil
)
testResolution
(
t
,
r
,
"singlednslabelshouldbeok"
,
2
,
"/ipfs/bafybeih4a6ylafdki6ailjrdvmr7o4fbbeceeeuty4v3qyyouiz5koqlpi"
,
nil
)
testResolution
(
t
,
r
,
"www.wealdtech.eth"
,
1
,
"/ipns/ipfs.example.com"
,
ErrResolveRecursion
)
testResolution
(
t
,
r
,
"www.wealdtech.eth"
,
2
,
"/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD"
,
nil
)
testResolution
(
t
,
r
,
"www.wealdtech.eth"
,
2
,
"/ipfs/QmY3hE8xgFCjGcz6PHgnvJz5HZi1BaKRfPkn1ghZUcYMjD"
,
nil
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment