Skip to content

Commit

Permalink
test: fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Nov 8, 2022
1 parent 2a1007c commit 64196aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/rdap/rdap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestRdapParsing(t *testing.T) {
{domain: "google.sg", err: "No RDAP servers found for 'google.sg'"},
{domain: "google.sk", err: "No RDAP servers found for 'google.sk'"},
{domain: "google.ro", err: "No RDAP servers found for 'google.ro'"},
{domain: "watchub.pw", err: ""},
{domain: "google.pw", err: ""},
{domain: "google.co.id", err: ""},
{domain: "google.kr", err: "No RDAP servers found for 'google.kr'"},
{domain: "google.host", err: ""},
Expand Down
6 changes: 3 additions & 3 deletions internal/whois/whois_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestWhoisParsing(t *testing.T) {
{domain: "google.ro", err: ""},
{domain: "google.pt", err: "i/o timeout"},
{domain: "google.it", err: ""},
{domain: "watchub.pw", err: ""},
{domain: "google.pw", err: ""},
{domain: "google.co.id", err: ""},
{domain: "google.kr", err: ""},
{domain: "google.jp", err: ""},
Expand All @@ -54,9 +54,9 @@ func TestWhoisParsing(t *testing.T) {
is.NoErr(err) // expected no errors
is.True(time.Since(expiry).Hours() < 0) // domain must not be expired
} else {
is.True(err != nil) // expected an error
t.Log(err)
is.True(err != nil) // expected an error
is.True(strings.Contains(err.Error(), tt.err)) // expected error to contain message
t.Log(err)
}
})
}
Expand Down

0 comments on commit 64196aa

Please sign in to comment.