Skip to content

Commit

Permalink
Merge pull request #196 from MrDXY/replace-test-errors-with-assert-ut…
Browse files Browse the repository at this point in the history
…il-test

Test: Replace t.error/fatal with assert/request in [util_test.go]
  • Loading branch information
ahrtr committed Apr 15, 2024
2 parents 3a6e6ae + 73f6b98 commit 2f1d0c5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"strings"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

pb "go.etcd.io/raft/v3/raftpb"
Expand Down Expand Up @@ -137,9 +138,7 @@ func TestIsResponseMsg(t *testing.T) {

for i, tt := range tests {
got := IsResponseMsg(tt.msgt)
if got != tt.isResponse {
t.Errorf("#%d: got %v, want %v", i, got, tt.isResponse)
}
assert.Equal(t, tt.isResponse, got, "#%d", i)
}
}

Expand Down

0 comments on commit 2f1d0c5

Please sign in to comment.