Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary committed Nov 25, 2024
1 parent fb0fa70 commit 5fe604c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
37 changes: 37 additions & 0 deletions mocks/i_rewards_client.go

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

7 changes: 5 additions & 2 deletions pkg/updater/updater_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ type mockRewardsClient struct {
}

func (m *mockRewardsClient) GenerateRewards(ctx context.Context, req *v1.GenerateRewardsRequest, opts ...grpc.CallOption) (*v1.GenerateRewardsResponse, error) {
return &v1.GenerateRewardsResponse{Snapshot: "2024-10-31"}, nil
return &v1.GenerateRewardsResponse{CutoffDate: "2024-10-31"}, nil
}

func (m *mockRewardsClient) GenerateRewardsRoot(ctx context.Context, req *v1.GenerateRewardsRootRequest, opts ...grpc.CallOption) (*v1.GenerateRewardsRootResponse, error) {
return &v1.GenerateRewardsRootResponse{RewardsRoot: "0xb4a614cc0bf38dff74822a0744aab5b8897a6868c3b612980436be219a25be21"}, nil
return &v1.GenerateRewardsRootResponse{
RewardsRoot: "0xb4a614cc0bf38dff74822a0744aab5b8897a6868c3b612980436be219a25be21",
RewardsCalcEndDate: "2024-10-31",
}, nil
}

func TestUpdaterUpdate(t *testing.T) {
Expand Down

0 comments on commit 5fe604c

Please sign in to comment.