Skip to content

Commit

Permalink
ADD: test case
Browse files Browse the repository at this point in the history
  • Loading branch information
oif committed Sep 24, 2017
1 parent f157a55 commit 35f8a77
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/gdns/gdns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func TestGoogleDNS(t *testing.T) {
_, _, err := request.Request()
assert.Error(t, err, "Invalid resolve name")

request.Name = "google.com"
request.Type = dns.TypeNone
request.Request()
assert.Equal(t, dns.TypeANY, request.Type, "Default rr type ANY")

initClient()
request = &ResolveRequest{
Name: "example.com",
Expand All @@ -61,7 +66,6 @@ func TestGoogleDNS(t *testing.T) {
resp, statusCode, err := request.Request()
assert.NoError(t, err, "Should have no any error")
assert.Equal(t, 200, statusCode, "Response status code should be 200 but %d get", statusCode)
assert.Equal(t, dns.TypeANY, request.Type, "Default rr type ANY")
// end resolve test

// start test resolve response
Expand Down

0 comments on commit 35f8a77

Please sign in to comment.