Skip to content

Commit

Permalink
fail on unexpected err
Browse files Browse the repository at this point in the history
  • Loading branch information
olegshmuelov committed Oct 28, 2024
1 parent 67138b1 commit d5c4d31
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ekm/signer_key_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -849,9 +849,12 @@ func TestConcurrentSlashingProtectionAttData(t *testing.T) {
// Count errors and successes.
var slashableErrors, successCount int
for err := range errChan {
if err != nil && err.Error() == "slashable attestation (HighestAttestationVote), not signing" {
if err != nil {
if err.Error() != "slashable attestation (HighestAttestationVote), not signing" {
require.Fail(t, "unexpected error: %v", err)
}
slashableErrors++
} else if err == nil {
} else {
successCount++
}
}
Expand Down Expand Up @@ -904,9 +907,12 @@ func TestConcurrentSlashingProtectionBeaconBlock(t *testing.T) {
// Count errors and successes.
var slashableErrors, successCount int
for err := range errChan {
if err != nil && err.Error() == "slashable proposal (HighestProposalVote), not signing" {
if err != nil {
if err.Error() != "slashable proposal (HighestProposalVote), not signing" {
require.Fail(t, "unexpected error: %v", err)
}
slashableErrors++
} else if err == nil {
} else {
successCount++
}
}
Expand Down

0 comments on commit d5c4d31

Please sign in to comment.