mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test: Fix gosimple errors
Getting gosimple suggestion while running test script, so this PR is for fixing gosimple S1019 check. raft/node_test.go:456:40: should use make([]raftpb.Entry, 1) instead (S1019) raft/node_test.go:457:49: should use make([]raftpb.Entry, 1) instead (S1019) raft/node_test.go:458:43: should use make([]raftpb.Message, 1) instead (S1019) Refer https://github.com/dominikh/go-tools/blob/master/cmd/gosimple/README.md#checks for more information.
This commit is contained in:
@@ -453,9 +453,9 @@ func TestReadyContainUpdates(t *testing.T) {
|
||||
{Ready{}, false},
|
||||
{Ready{SoftState: &SoftState{Lead: 1}}, true},
|
||||
{Ready{HardState: raftpb.HardState{Vote: 1}}, true},
|
||||
{Ready{Entries: make([]raftpb.Entry, 1, 1)}, true},
|
||||
{Ready{CommittedEntries: make([]raftpb.Entry, 1, 1)}, true},
|
||||
{Ready{Messages: make([]raftpb.Message, 1, 1)}, true},
|
||||
{Ready{Entries: make([]raftpb.Entry, 1)}, true},
|
||||
{Ready{CommittedEntries: make([]raftpb.Entry, 1)}, true},
|
||||
{Ready{Messages: make([]raftpb.Message, 1)}, true},
|
||||
{Ready{Snapshot: raftpb.Snapshot{Metadata: raftpb.SnapshotMetadata{Index: 1}}}, true},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user