mirror of
https://github.com/wneessen/go-hibp.git
synced 2024-11-22 21:00:51 +01:00
Make golinter happy
This commit is contained in:
parent
a50a8603eb
commit
cf595cd5ea
1 changed files with 7 additions and 1 deletions
|
@ -15,7 +15,7 @@ func TestBreaches(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
if len(breachList) <= 0 {
|
if breachList != nil && len(breachList) <= 0 {
|
||||||
t.Error("breaches list returned 0 results")
|
t.Error("breaches list returned 0 results")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,12 @@ func TestBreachesWithDomain(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if breachList == nil && tc.isBreached {
|
||||||
|
t.Errorf("domain %s is expected to be breached, but returned 0 results.",
|
||||||
|
tc.domain)
|
||||||
|
}
|
||||||
|
|
||||||
breachLen := len(breachList)
|
breachLen := len(breachList)
|
||||||
if tc.isBreached && breachLen <= 0 {
|
if tc.isBreached && breachLen <= 0 {
|
||||||
t.Errorf("domain %s is expected to be breached, but returned 0 results.",
|
t.Errorf("domain %s is expected to be breached, but returned 0 results.",
|
||||||
|
|
Loading…
Reference in a new issue