Skip to content

Commit

Permalink
[node-split] Update mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jellonek committed Dec 13, 2024
1 parent a7d3cee commit c1615a0
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions activation/activation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ type testAtxBuilder struct {
mnipost *MocknipostBuilder
mpostClient *MockPostClient
mclock *MocklayerClock
msync *Mocksyncer
msync *MockSyncer
mValidator *MocknipostValidator
}

Expand All @@ -87,7 +87,7 @@ func newTestBuilder(tb testing.TB, numSigners int, opts ...BuilderOption) *testA
mnipost: NewMocknipostBuilder(ctrl),
mpostClient: NewMockPostClient(ctrl),
mclock: NewMocklayerClock(ctrl),
msync: NewMocksyncer(ctrl),
msync: NewMockSyncer(ctrl),
mValidator: NewMocknipostValidator(ctrl),
}

Expand Down
4 changes: 2 additions & 2 deletions activation/e2e/activation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
"github.com/spacemeshos/go-spacemesh/timesync"
)

func syncedSyncer(tb testing.TB) *activation.Mocksyncer {
syncer := activation.NewMocksyncer(gomock.NewController(tb))
func syncedSyncer(tb testing.TB) *activation.MockSyncer {
syncer := activation.NewMockSyncer(gomock.NewController(tb))
syncer.EXPECT().RegisterForATXSynced().DoAndReturn(func() <-chan struct{} {
synced := make(chan struct{})
close(synced)
Expand Down
40 changes: 20 additions & 20 deletions activation/mocks.go

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

2 changes: 1 addition & 1 deletion activation/post_supervisor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func newPostManager(tb testing.TB, cfg PostConfig, opts PostSetupOpts) *PostSetu
Post(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).
AnyTimes()

syncer := NewMocksyncer(ctrl)
syncer := NewMockSyncer(ctrl)
syncer.EXPECT().RegisterForATXSynced().DoAndReturn(func() <-chan struct{} {
ch := make(chan struct{})
close(ch)
Expand Down
2 changes: 1 addition & 1 deletion activation/post_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func newTestPostManager(tb testing.TB) *testPostManager {
Post(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).
AnyTimes()
validator.EXPECT().VerifyChain(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes()
syncer := NewMocksyncer(gomock.NewController(tb))
syncer := NewMockSyncer(gomock.NewController(tb))
synced := make(chan struct{})
close(synced)
syncer.EXPECT().RegisterForATXSynced().AnyTimes().Return(synced)
Expand Down
4 changes: 2 additions & 2 deletions api/grpcserver/post_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func launchPostSupervisor(
Post(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).
AnyTimes()

syncer := activation.NewMocksyncer(ctrl)
syncer := activation.NewMockSyncer(ctrl)
syncer.EXPECT().RegisterForATXSynced().DoAndReturn(func() <-chan struct{} {
ch := make(chan struct{})
close(ch)
Expand Down Expand Up @@ -96,7 +96,7 @@ func launchPostSupervisorTLS(
validator.EXPECT().
Post(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).
AnyTimes()
syncer := activation.NewMocksyncer(ctrl)
syncer := activation.NewMockSyncer(ctrl)
syncer.EXPECT().RegisterForATXSynced().DoAndReturn(func() <-chan struct{} {
ch := make(chan struct{})
close(ch)
Expand Down
2 changes: 1 addition & 1 deletion systest/tests/distributed_post_verification_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestPostMalfeasanceProof(t *testing.T) {
t.Cleanup(func() { assert.NoError(t, host.Stop()) })

ctrl := gomock.NewController(t)
syncer := activation.NewMocksyncer(ctrl)
syncer := activation.NewMockSyncer(ctrl)
syncer.EXPECT().RegisterForATXSynced().DoAndReturn(func() <-chan struct{} {
ch := make(chan struct{})
close(ch)
Expand Down

0 comments on commit c1615a0

Please sign in to comment.