Skip to content

Commit

Permalink
chore: change mockgen to uber library
Browse files Browse the repository at this point in the history
  • Loading branch information
cisse21 committed Jul 22, 2024
1 parent e9faa66 commit 981c254
Show file tree
Hide file tree
Showing 82 changed files with 142 additions and 104 deletions.
3 changes: 2 additions & 1 deletion app/cluster/dynamic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/stretchr/testify/require"

mockjobsforwarder "github.com/rudderlabs/rudder-server/mocks/jobs-forwarder"
Expand Down
3 changes: 2 additions & 1 deletion app/cluster/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import (

"github.com/rudderlabs/rudder-server/enterprise/trackedusers"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/google/uuid"
"github.com/ory/dockertest/v3"
"github.com/stretchr/testify/require"
Expand Down
4 changes: 2 additions & 2 deletions backend-config/backend-config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package backendconfig

// go:generate mockgen -destination=../mocks/backend-config/mock_backendconfig.go -package=mock_backendconfig github.com/rudderlabs/rudder-server/backend-config BackendConfig
// go:generate mockgen -destination=./mock_workspaceconfig.go -package=backendconfig -source=./backend-config.go workspaceConfig
//go:generate mockgen -destination=../mocks/backend-config/mock_backendconfig.go -package=mock_backendconfig github.com/rudderlabs/rudder-server/backend-config BackendConfig
//go:generate mockgen -destination=./mock_workspaceconfig.go -package=backendconfig -source=./backend-config.go workspaceConfig

import (
"context"
Expand Down
3 changes: 2 additions & 1 deletion backend-config/backend_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/ory/dockertest/v3"
"github.com/stretchr/testify/require"

Expand Down
17 changes: 11 additions & 6 deletions backend-config/mock_workspaceconfig.go

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

2 changes: 1 addition & 1 deletion enterprise/reporting/config_subscriber_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"testing"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/rudderlabs/rudder-go-kit/logger"
backendconfig "github.com/rudderlabs/rudder-server/backend-config"
Expand Down
2 changes: 1 addition & 1 deletion enterprise/reporting/event_stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"testing"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/rudderlabs/rudder-go-kit/logger"
"github.com/rudderlabs/rudder-go-kit/stats/memstats"
Expand Down
2 changes: 1 addition & 1 deletion enterprise/reporting/flusher/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"testing"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"

"github.com/rudderlabs/rudder-go-kit/config"
"github.com/rudderlabs/rudder-go-kit/logger"
Expand Down
3 changes: 2 additions & 1 deletion gateway/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import (
kithelper "github.com/rudderlabs/rudder-go-kit/testhelper"
kituuid "github.com/rudderlabs/rudder-go-kit/uuid"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/google/uuid"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
3 changes: 2 additions & 1 deletion gateway/webhook/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import (
"testing"
"testing/iotest"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down
5 changes: 3 additions & 2 deletions integration_test/warehouse/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"go.uber.org/atomic"
"go.uber.org/mock/gomock"

"github.com/google/uuid"
"github.com/ory/dockertest/v3"
"github.com/samber/lo"
"github.com/stretchr/testify/require"
"go.uber.org/atomic"

"github.com/rudderlabs/compose-test/compose"
"github.com/rudderlabs/compose-test/testcompose"
Expand Down
15 changes: 10 additions & 5 deletions mocks/backend-config/mock_backendconfig.go

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

2 changes: 1 addition & 1 deletion processor/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import (

"github.com/rudderlabs/rudder-server/enterprise/trackedusers"

"github.com/golang/mock/gomock"
"github.com/google/uuid"
. "github.com/onsi/gomega"
"github.com/ory/dockertest/v3"
"github.com/samber/lo"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/rudderlabs/rudder-go-kit/config"
"github.com/rudderlabs/rudder-go-kit/logger"
Expand Down
2 changes: 1 addition & 1 deletion processor/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ import (

"github.com/rudderlabs/rudder-server/enterprise/trackedusers"

"github.com/golang/mock/gomock"
"github.com/google/uuid"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/format"
"github.com/stretchr/testify/require"
"github.com/tidwall/gjson"
"github.com/tidwall/sjson"
"go.uber.org/mock/gomock"

"github.com/rudderlabs/rudder-go-kit/config"
"github.com/rudderlabs/rudder-go-kit/logger"
Expand Down
2 changes: 1 addition & 1 deletion processor/transformer/transformer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

warehouseutils "github.com/rudderlabs/rudder-server/warehouse/utils"

Expand Down
2 changes: 1 addition & 1 deletion regulation-worker/internal/delete/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"time"

"github.com/go-chi/chi/v5"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

"github.com/rudderlabs/rudder-go-kit/config"
backendconfig "github.com/rudderlabs/rudder-server/backend-config"
Expand Down
2 changes: 1 addition & 1 deletion regulation-worker/internal/delete/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"testing"

gomock "github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
gomock "go.uber.org/mock/gomock"

"github.com/rudderlabs/rudder-server/regulation-worker/internal/delete"
"github.com/rudderlabs/rudder-server/regulation-worker/internal/model"
Expand Down
2 changes: 1 addition & 1 deletion regulation-worker/internal/destination/destination_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

backendconfig "github.com/rudderlabs/rudder-server/backend-config"
"github.com/rudderlabs/rudder-server/regulation-worker/internal/destination"
Expand Down
2 changes: 1 addition & 1 deletion regulation-worker/internal/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"testing"

gomock "github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
gomock "go.uber.org/mock/gomock"

"github.com/rudderlabs/rudder-server/regulation-worker/internal/model"
"github.com/rudderlabs/rudder-server/regulation-worker/internal/service"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (
"path/filepath"
"sync"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

Expand All @@ -24,7 +25,7 @@ import (
mock_bulkservice "github.com/rudderlabs/rudder-server/mocks/router/bingads"
mocks_oauth "github.com/rudderlabs/rudder-server/mocks/services/oauth"
"github.com/rudderlabs/rudder-server/router/batchrouter/asyncdestinationmanager/common"
oauth "github.com/rudderlabs/rudder-server/services/oauth"
"github.com/rudderlabs/rudder-server/services/oauth"
"github.com/rudderlabs/rudder-server/utils/misc"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import (
"path/filepath"
"sync"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

Expand All @@ -24,7 +25,7 @@ import (
mock_bulkservice "github.com/rudderlabs/rudder-server/mocks/router/bingads"
mocks_oauth "github.com/rudderlabs/rudder-server/mocks/services/oauth"
"github.com/rudderlabs/rudder-server/router/batchrouter/asyncdestinationmanager/common"
oauth "github.com/rudderlabs/rudder-server/services/oauth"
"github.com/rudderlabs/rudder-server/services/oauth"
"github.com/rudderlabs/rudder-server/utils/misc"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"path/filepath"
"sync"

"github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo/v2"
"go.uber.org/mock/gomock"

. "github.com/onsi/gomega"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/stretchr/testify/assert"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

backendconfig "github.com/rudderlabs/rudder-server/backend-config"
"github.com/rudderlabs/rudder-server/jobsdb"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"sync"
"time"

"github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"go.uber.org/mock/gomock"

"github.com/rudderlabs/rudder-go-kit/config"
"github.com/rudderlabs/rudder-go-kit/logger"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"os"
"path/filepath"

"github.com/golang/mock/gomock"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"go.uber.org/mock/gomock"

"github.com/rudderlabs/rudder-go-kit/logger"
"github.com/rudderlabs/rudder-go-kit/stats"
Expand Down
3 changes: 2 additions & 1 deletion router/batchrouter/batchrouter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import (
"github.com/rudderlabs/rudder-server/testhelper/backendconfigtest"
"github.com/rudderlabs/rudder-server/testhelper/destination"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"

"github.com/google/uuid"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
Loading

0 comments on commit 981c254

Please sign in to comment.