Skip to content

Commit

Permalink
test: disable odoh tests
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Jul 1, 2023
1 parent f9c4ab6 commit 85953c0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
19 changes: 10 additions & 9 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ func TestMainVersion(t *testing.T) {
}))
}

func TestMainODoHQuery(t *testing.T) {
clearOpts()
assert.Nil(t, driver([]string{
"-v",
"-q", "example.com",
"-s", "https://odoh.cloudflare-dns.com",
"--odoh-proxy", "https://odoh.crypto.sx",
}))
}
// TODO
//func TestMainODoHQuery(t *testing.T) {
// clearOpts()
// assert.Nil(t, driver([]string{
// "-v",
// "-q", "example.com",
// "-s", "https://odoh.cloudflare-dns.com",
// "--odoh-proxy", "https://odoh.crypto.sx",
// }))
//}

func TestMainRawFormat(t *testing.T) {
clearOpts()
Expand Down
27 changes: 14 additions & 13 deletions transport/odoh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@ func TestTransportBuildURL(t *testing.T) {
assert.Equal(t, "http://www.example.com", u.String())
}

func TestTransportODoH(t *testing.T) {
msg := dns.Msg{}
msg.RecursionDesired = true
msg.Question = []dns.Question{{
Name: "example.com.",
Qtype: dns.StringToType["A"],
Qclass: dns.ClassINET,
}}

reply, err := ODoH(msg, "odoh.cloudflare-dns.com", "odoh.crypto.sx")
assert.Nil(t, err)
assert.Greater(t, len(reply.Answer), 0)
}
// TODO: Enable test
//func TestTransportODoH(t *testing.T) {
// msg := dns.Msg{}
// msg.RecursionDesired = true
// msg.Question = []dns.Question{{
// Name: "example.com.",
// Qtype: dns.StringToType["A"],
// Qclass: dns.ClassINET,
// }}
//
// reply, err := ODoH(msg, "odoh.cloudflare-dns.com", "odoh.crypto.sx")
// assert.Nil(t, err)
// assert.Greater(t, len(reply.Answer), 0)
//}

func TestTransportODoHInvalidTarget(t *testing.T) {
msg := dns.Msg{}
Expand Down

0 comments on commit 85953c0

Please sign in to comment.