Make golinter happy

This commit is contained in:
Winni Neessen 2021-09-22 15:10:10 +02:00
parent 0af72e7207
commit c33397ed39
Signed by: wneessen
GPG key ID: 385AC9889632126E

View file

@ -251,8 +251,13 @@ func TestBreachedAccountWithoutTruncate(t *testing.T) {
t.Error(err)
return
}
if len(breachDetails) == 0 && !tc.shouldFail {
t.Errorf("breach details for account %q are expected but none were returned", tc.accountName)
return
}
for _, b := range breachDetails {
if len(breachDetails) > 0 {
b := breachDetails[0]
if tc.breachName != b.Name {
t.Errorf("breach name for the account %q does not match. expected: %q, got: %q",
tc.accountName, tc.breachName, b.Name)
@ -261,7 +266,6 @@ func TestBreachedAccountWithoutTruncate(t *testing.T) {
t.Errorf("breach domain for the account %q does not match. expected: %q, got: %q",
tc.accountName, tc.breachDomain, b.Domain)
}
return
}
})
}