refactor: use shared mocks for tests

This commit is contained in:
talksik
2026-04-22 09:06:10 -07:00
parent 2e9ff742a0
commit 110f4594be
10 changed files with 304 additions and 174 deletions
+2 -2
View File
@@ -8,8 +8,8 @@ import (
pbaero "github.com/flowy-live/llink/genproto/aero"
"github.com/flowy-live/llink/internal/billing"
"github.com/flowy-live/llink/internal/network"
"github.com/flowy-live/llink/internal/network/mocks"
"github.com/flowy-live/llink/internal/testhelper"
"github.com/flowy-live/llink/internal/testhelper/mocks/aero"
"github.com/jackc/pgx/v5/pgxpool"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"
@@ -27,7 +27,7 @@ func TestMain(m *testing.M) {
func newTestService(t *testing.T) network.Service {
ctrl := gomock.NewController(t)
mockAero := mocks.NewMockPrimaryClient(ctrl)
mockAero := aero.NewMockPrimaryClient(ctrl)
mockAero.EXPECT().
ShootEmail(gomock.Any(), gomock.Any()).
Return(&pbaero.ShootEmailResponse{}, nil).