Skip to content

Commit 1486e41

Browse files
committed
Fix mock files generation
1 parent cd367ef commit 1486e41

File tree

41 files changed

+14453
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+14453
-59
lines changed

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ require (
4040
github.com/jongio/azidext/go/azidext v0.5.0
4141
github.com/openshift/client-go v0.0.0-20240528061634-b054aa794d87
4242
github.com/openshift/library-go v0.0.0-20240607134135-aed018c215a1
43+
go.uber.org/mock v0.4.0
4344
)
4445

4546
require (

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ go.starlark.net v0.0.0-20230525235612-a134d8f9ddca h1:VdD38733bfYv5tUZwEIskMM93V
372372
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca/go.mod h1:jxU+3+j+71eXOW14274+SmmuW82qJzl6iZSeqEtTGds=
373373
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
374374
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
375+
go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU=
376+
go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
375377
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
376378
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
377379
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=

pkg/cloud/azure/services/resourceskus/mock_resourceskus/doc.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ limitations under the License.
1616

1717
// Run go generate to regenerate this mock.
1818
//
19-
//go:generate ../../../../hack/tools/bin/mockgen -destination resourceskus_mock.go -package mock_resourceskus -source ../client.go Client
20-
//go:generate /usr/bin/env bash -c "cat ../../../../hack/boilerplate/boilerplate.generatego.txt resourceskus_mock.go > _resourceskus_mock.go && mv _resourceskus_mock.go resourceskus_mock.go"
19+
//go:generate go run go.uber.org/mock/mockgen -destination resourceskus_mock.go -package mock_resourceskus -source ../client.go Client
2120
package mock_resourceskus //nolint

pkg/cloud/azure/services/resourceskus/mock_resourceskus/resourceskus_mock.go

Lines changed: 7 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/util/cache/ttllru/mocks/doc.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
//go:generate ../../../../hack/tools/bin/mockgen -destination ttllru_mock.go -package mock_ttllru -source ../ttllru.go Cacher PeekingCacher
18-
//go:generate /usr/bin/env bash -c "cat ../../../../hack/boilerplate/boilerplate.generatego.txt ttllru_mock.go > _ttllru_mock.go && mv _ttllru_mock.go ttllru_mock.go"
17+
//go:generate go run go.uber.org/mock/mockgen -destination ttllru_mock.go -package mock_ttllru -source ../ttllru.go Cacher PeekingCacher
1918
package mock_ttllru //nolint

pkg/util/cache/ttllru/mocks/ttllru_mock.go

Lines changed: 27 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/util/cache/ttllru/ttllru_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import (
2121
"testing"
2222
"time"
2323

24-
"github.com/golang/mock/gomock"
2524
. "github.com/onsi/gomega"
25+
"go.uber.org/mock/gomock"
2626

2727
//gomockinternal "sigs.k8s.io/cluster-api-provider-azure/internal/test/matchers/gomock"
2828
mockttllru "github.com/openshift/machine-api-provider-azure/pkg/util/cache/ttllru/mocks"

tools.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
_ "github.com/onsi/ginkgo/v2/ginkgo"
1111
_ "github.com/openshift/api/config/v1/zz_generated.crd-manifests"
1212
_ "github.com/openshift/api/machine/v1beta1/zz_generated.crd-manifests"
13+
_ "go.uber.org/mock/mockgen"
1314
_ "sigs.k8s.io/controller-runtime/tools/setup-envtest"
1415
_ "sigs.k8s.io/controller-tools/cmd/controller-gen"
1516
)

vendor/go.uber.org/mock/AUTHORS

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)