Skip to content

Commit

Permalink
Fix initialization on fcm e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelreiswildlife committed Jun 25, 2024
1 parent a95ced0 commit 7da720d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions e2e/fcm_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/topfreegames/pusher/extensions"
"github.com/topfreegames/pusher/extensions/firebase"
"github.com/topfreegames/pusher/interfaces"
firebaseMock "github.com/topfreegames/pusher/mocks/firebase"
mocks "github.com/topfreegames/pusher/mocks/interfaces"
"github.com/topfreegames/pusher/pusher"
"go.uber.org/mock/gomock"
Expand Down Expand Up @@ -46,7 +45,7 @@ func (s *FcmE2ETestSuite) SetupSuite() {
s.vConfig = v
}

func (s *FcmE2ETestSuite) setupFcmPusher(appName string) (*firebaseMock.MockPushClient, *mocks.MockStatsDClient) {
func (s *FcmE2ETestSuite) setupFcmPusher(appName string) (*mocks.MockPushClient, *mocks.MockStatsDClient) {
ctrl := gomock.NewController(s.T())

statsdClientMock := mocks.NewMockStatsDClient(ctrl)
Expand Down Expand Up @@ -74,14 +73,15 @@ func (s *FcmE2ETestSuite) setupFcmPusher(appName string) (*firebaseMock.MockPush
limit := s.vConfig.GetInt("gcm.rateLimit.rpm")
rateLimiter := extensions.NewRateLimiter(limit, s.vConfig, []interfaces.StatsReporter{statsReport}, logger)

pushClient := firebaseMock.NewMockPushClient(ctrl)
pushClient := mocks.NewMockPushClient(ctrl)
gcmPusher.MessageHandler = map[string]interfaces.MessageHandler{
appName: firebase.NewMessageHandler(
appName,
pushClient,
[]interfaces.FeedbackReporter{},
[]interfaces.StatsReporter{statsReport},
rateLimiter,
nil,
logger,
s.config.GCM.ConcurrentWorkers,
),
Expand Down

0 comments on commit 7da720d

Please sign in to comment.