Skip to content

Commit

Permalink
Make golinter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
wneessen committed Sep 22, 2021
1 parent 0af72e7 commit c33397e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions breach_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
}
})
}
Expand Down

0 comments on commit c33397e

Please sign in to comment.