Skip to content

Commit

Permalink
Bump mocks (#1600)
Browse files Browse the repository at this point in the history
The original mock framework is now a public archive (https://github.com/golang/mock) and https://github.com/uber-go/mock is now used.
This PR changes the mocks lib.

Signed-off-by: Michal Kuritka <[email protected]>
  • Loading branch information
kuritka authored Jun 14, 2024
1 parent 6d4c520 commit 767dd43
Show file tree
Hide file tree
Showing 14 changed files with 122 additions and 71 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ k8gb: lint

.PHONY: mocks
mocks:
go install github.com/golang/mock/mockgen@v1.5.0
go install go.uber.org/mock/mockgen@v0.4.0
mockgen -package=mocks -destination=controllers/mocks/assistant_mock.go -source=controllers/providers/assistant/assistant.go Assistant
mockgen -package=mocks -destination=controllers/mocks/infoblox-client_mock.go -source=controllers/providers/dns/infoblox-client.go InfobloxClient
mockgen -package=mocks -destination=controllers/mocks/infoblox-connection_mock.go github.com/infobloxopen/infoblox-go-client IBConnector
Expand Down
2 changes: 1 addition & 1 deletion controllers/gslb_controller_reconciliation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ import (
"github.com/k8gb-io/k8gb/controllers/tracing"

str "github.com/AbsaOSS/gopkg/string"
"github.com/golang/mock/gomock"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"

Check failure on line 47 in controllers/gslb_controller_reconciliation_test.go

View workflow job for this annotation

GitHub Actions / Inspect packages

import 'go.uber.org/mock/gomock' is not allowed from list 'main' (depguard)
corev1 "k8s.io/api/core/v1"
netv1 "k8s.io/api/networking/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down
2 changes: 1 addition & 1 deletion controllers/gslb_controller_weight_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/k8gb-io/k8gb/controllers/mocks"
"github.com/k8gb-io/k8gb/controllers/providers/assistant"

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

Check failure on line 15 in controllers/gslb_controller_weight_test.go

View workflow job for this annotation

GitHub Actions / Inspect packages

import 'go.uber.org/mock/gomock' is not allowed from list 'main' (depguard)
"sigs.k8s.io/controller-runtime/pkg/client"
externaldns "sigs.k8s.io/external-dns/endpoint"
)
Expand Down
17 changes: 11 additions & 6 deletions controllers/mocks/assistant_mock.go

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

74 changes: 49 additions & 25 deletions controllers/mocks/client_mock.go

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

7 changes: 6 additions & 1 deletion controllers/mocks/infoblox-client_mock.go

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

17 changes: 11 additions & 6 deletions controllers/mocks/infoblox-connection_mock.go

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

Loading

0 comments on commit 767dd43

Please sign in to comment.