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 23, 2024
1 parent e9faa66 commit ca647e3
Show file tree
Hide file tree
Showing 98 changed files with 352 additions and 416 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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ require (
github.com/redis/go-redis/v9 v9.5.4
github.com/rs/cors v1.11.0
github.com/rudderlabs/analytics-go v3.3.3+incompatible
github.com/rudderlabs/bing-ads-go-sdk v0.2.2
github.com/rudderlabs/bing-ads-go-sdk v0.2.3
github.com/rudderlabs/compose-test v0.1.3
github.com/rudderlabs/rudder-go-kit v0.34.2
github.com/rudderlabs/rudder-go-kit v0.35.0
github.com/rudderlabs/rudder-observability-kit v0.0.3
github.com/rudderlabs/rudder-schemas v0.5.0
github.com/rudderlabs/sql-tunnels v0.1.7
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1114,14 +1114,14 @@ github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8=
github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
github.com/rudderlabs/analytics-go v3.3.3+incompatible h1:OG0XlKoXfr539e2t1dXtTB+Gr89uFW+OUNQBVhHIIBY=
github.com/rudderlabs/analytics-go v3.3.3+incompatible/go.mod h1:LF8/ty9kUX4PTY3l5c97K3nZZaX5Hwsvt+NBaRL/f30=
github.com/rudderlabs/bing-ads-go-sdk v0.2.2 h1:ZjMZGLhdeNcOXrezPQHqyZUdzR+KjPOzmZaFKjf07kk=
github.com/rudderlabs/bing-ads-go-sdk v0.2.2/go.mod h1:FJPcpqBez2uG4kB6WBj05YLlY5Q3iknNj/fn7Bv9nDs=
github.com/rudderlabs/bing-ads-go-sdk v0.2.3 h1:jR85Ep6X6SkiesaI7Q7WJHs/65SgByZbZHAKLK0V94Q=
github.com/rudderlabs/bing-ads-go-sdk v0.2.3/go.mod h1:38Yig/202ni4GcloXhaTeH1LqUyFPEx6iljnFa+IDQI=
github.com/rudderlabs/compose-test v0.1.3 h1:uyep6jDCIF737sfv4zIaMsKRQKX95IDz5Xbxor+x0kU=
github.com/rudderlabs/compose-test v0.1.3/go.mod h1:tuvS1eQdSfwOYv1qwyVAcpdJxPLQXJgy5xGDd/9XmMg=
github.com/rudderlabs/parquet-go v0.0.2 h1:ZXRdZdimB0PdJtmxeSSxfI0fDQ3kZjwzBxRi6Ut1J8k=
github.com/rudderlabs/parquet-go v0.0.2/go.mod h1:g6guum7o8uhj/uNhunnt7bw5Vabu/goI5i21/3fnxWQ=
github.com/rudderlabs/rudder-go-kit v0.34.2 h1:aBrrMAfY7FR5f/k0V5Mv8xqaMXVTSPfkXLAU+j380Ds=
github.com/rudderlabs/rudder-go-kit v0.34.2/go.mod h1:WCAJAuOGpWyoryNxOJRtbWVpI+YpsL91fThhWq5+snI=
github.com/rudderlabs/rudder-go-kit v0.35.0 h1:Qb74M91dAmt9CE+9ecWKxNYh0wSwi6m/3LI01kBXPPo=
github.com/rudderlabs/rudder-go-kit v0.35.0/go.mod h1:o9bQRIVSwyidgPfdw0pzA9RUO+8jclLWsLZ4+JYm8f4=
github.com/rudderlabs/rudder-observability-kit v0.0.3 h1:vZtuZRkGX+6rjaeKtxxFE2YYP6QlmAcVcgecTOjvz+Q=
github.com/rudderlabs/rudder-observability-kit v0.0.3/go.mod h1:6UjAh3H6rkE0fFLh7z8ZGQEQbKtUkRfhWOf/OUhfqW8=
github.com/rudderlabs/rudder-schemas v0.5.0 h1:+140Amou92sB4ZXwsX3jgRIdjNfERJJgYOx0bcUkxzg=
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.

80 changes: 0 additions & 80 deletions mocks/router/bingads/mock_bulkservice.go

This file was deleted.

Loading

0 comments on commit ca647e3

Please sign in to comment.