Skip to content

Commit

Permalink
x/sync: Auto-generate MockNetworkClient (#2617)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrubabasu authored Jan 17, 2024
1 parent 003ed7f commit 68986d3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
1 change: 1 addition & 0 deletions scripts/mocks.mockgen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ github.com/ava-labs/avalanchego/vms/registry=VMRegisterer=vms/registry/mock_vm_r
github.com/ava-labs/avalanchego/vms/registry=VMRegistry=vms/registry/mock_vm_registry.go
github.com/ava-labs/avalanchego/vms=Factory,Manager=vms/mock_manager.go
github.com/ava-labs/avalanchego/x/sync=Client=x/sync/mock_client.go
github.com/ava-labs/avalanchego/x/sync=NetworkClient=x/sync/mock_network_client.go
3 changes: 0 additions & 3 deletions x/sync/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,6 @@ func sendRangeProofRequest(
},
).AnyTimes()

// Handle bandwidth tracking calls from client.
networkClient.EXPECT().TrackBandwidth(gomock.Any(), gomock.Any()).AnyTimes()

// The server should expect to "send" a response to the client.
sender.EXPECT().SendAppResponse(
gomock.Any(), // ctx
Expand Down
32 changes: 10 additions & 22 deletions x/sync/mock_network_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 68986d3

Please sign in to comment.