From 7716616ae2555ea31fe72d8c94fd0811f6074c31 Mon Sep 17 00:00:00 2001 From: Brandon Palm Date: Wed, 6 May 2026 08:14:52 -0500 Subject: [PATCH] mockgen deprecated: use uber-go/mock instead --- go.mod | 5 +++-- go.sum | 2 ++ pkg/coreos/coreos_test.go | 2 +- pkg/executer/mock_executer.go | 2 +- pkg/genisoimage/genisoimage_test.go | 2 +- pkg/ignition/mock_ignition.go | 2 +- pkg/installer/installer_test.go | 2 +- pkg/registry/registry_test.go | 2 +- pkg/release/mock_release.go | 2 +- pkg/release/release_test.go | 2 +- pkg/releasebundle/releasebundle_test.go | 2 +- pkg/skopeo/skopeo_test.go | 2 +- pkg/syslinux/syslinux_test.go | 2 +- 13 files changed, 16 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 3a3870c1..944ae369 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,6 @@ require ( github.com/distribution/distribution/v3 v3.0.0 github.com/dustin/go-humanize v1.0.1 github.com/go-openapi/swag v0.23.0 - github.com/golang/mock v1.7.0-rc.1 github.com/hashicorp/go-version v1.8.0 github.com/itchyny/gojq v0.12.18 github.com/onsi/ginkgo/v2 v2.28.1 @@ -33,6 +32,8 @@ require ( github.com/spf13/cobra v1.10.2 github.com/thedevsaddam/retry v1.2.1 github.com/thoas/go-funk v0.9.3 + github.com/vincent-petithory/dataurl v1.0.0 + go.uber.org/mock v0.6.0 golang.org/x/crypto v0.47.0 golang.org/x/term v0.39.0 k8s.io/api v0.30.3 @@ -133,6 +134,7 @@ require ( github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang-jwt/jwt/v5 v5.3.0 // indirect github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect + github.com/golang/mock v1.7.0-rc.1 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect @@ -233,7 +235,6 @@ require ( github.com/spf13/pflag v1.0.10 // indirect github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect github.com/ulikunitz/xz v0.5.15 // indirect - github.com/vincent-petithory/dataurl v1.0.0 // indirect github.com/vmware/govmomi v0.37.2 // indirect github.com/xlab/treeprint v1.2.0 // indirect github.com/yosida95/uritemplate/v3 v3.0.2 // indirect diff --git a/go.sum b/go.sum index 26a24e22..ca3b29ce 100644 --- a/go.sum +++ b/go.sum @@ -1288,6 +1288,8 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= diff --git a/pkg/coreos/coreos_test.go b/pkg/coreos/coreos_test.go index 0b222a73..0cdc2e0c 100644 --- a/pkg/coreos/coreos_test.go +++ b/pkg/coreos/coreos_test.go @@ -8,7 +8,7 @@ import ( "github.com/go-openapi/swag" "github.com/openshift/appliance/pkg/types" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" . "github.com/onsi/ginkgo/v2/dsl/core" . "github.com/onsi/gomega" "github.com/openshift/appliance/pkg/asset/config" diff --git a/pkg/executer/mock_executer.go b/pkg/executer/mock_executer.go index 58aca611..66fce339 100644 --- a/pkg/executer/mock_executer.go +++ b/pkg/executer/mock_executer.go @@ -8,7 +8,7 @@ import ( os "os" reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockExecuter is a mock of Executer interface. diff --git a/pkg/genisoimage/genisoimage_test.go b/pkg/genisoimage/genisoimage_test.go index df7f42eb..fc95702d 100644 --- a/pkg/genisoimage/genisoimage_test.go +++ b/pkg/genisoimage/genisoimage_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" . "github.com/onsi/ginkgo/v2/dsl/core" . "github.com/onsi/gomega" "github.com/openshift/appliance/pkg/executer" diff --git a/pkg/ignition/mock_ignition.go b/pkg/ignition/mock_ignition.go index c89f8523..aa49b3a8 100644 --- a/pkg/ignition/mock_ignition.go +++ b/pkg/ignition/mock_ignition.go @@ -8,7 +8,7 @@ import ( reflect "reflect" types "github.com/coreos/ignition/v2/config/v3_2/types" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockIgnition is a mock of Ignition interface. diff --git a/pkg/installer/installer_test.go b/pkg/installer/installer_test.go index d1688195..c7e1c7fc 100644 --- a/pkg/installer/installer_test.go +++ b/pkg/installer/installer_test.go @@ -10,7 +10,7 @@ import ( "github.com/openshift/appliance/pkg/release" "github.com/openshift/appliance/pkg/types" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" . "github.com/onsi/ginkgo/v2/dsl/core" . "github.com/onsi/gomega" "github.com/openshift/appliance/pkg/asset/config" diff --git a/pkg/registry/registry_test.go b/pkg/registry/registry_test.go index 13cb7331..e7d59464 100644 --- a/pkg/registry/registry_test.go +++ b/pkg/registry/registry_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" . "github.com/onsi/ginkgo/v2/dsl/core" . "github.com/onsi/ginkgo/v2/dsl/table" . "github.com/onsi/gomega" diff --git a/pkg/release/mock_release.go b/pkg/release/mock_release.go index 71f0fc49..28f2dbaf 100644 --- a/pkg/release/mock_release.go +++ b/pkg/release/mock_release.go @@ -7,7 +7,7 @@ package release import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockRelease is a mock of Release interface. diff --git a/pkg/release/release_test.go b/pkg/release/release_test.go index bd1fc4d0..b5edb432 100644 --- a/pkg/release/release_test.go +++ b/pkg/release/release_test.go @@ -8,7 +8,7 @@ import ( "testing" "github.com/go-openapi/swag" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" . "github.com/onsi/ginkgo/v2/dsl/core" . "github.com/onsi/gomega" "github.com/openshift/appliance/pkg/asset/config" diff --git a/pkg/releasebundle/releasebundle_test.go b/pkg/releasebundle/releasebundle_test.go index eeec29b5..f8296cca 100644 --- a/pkg/releasebundle/releasebundle_test.go +++ b/pkg/releasebundle/releasebundle_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" "github.com/openshift/appliance/pkg/executer" ) diff --git a/pkg/skopeo/skopeo_test.go b/pkg/skopeo/skopeo_test.go index 36dfa2b9..43a52aa5 100644 --- a/pkg/skopeo/skopeo_test.go +++ b/pkg/skopeo/skopeo_test.go @@ -7,7 +7,7 @@ import ( "github.com/openshift/appliance/pkg/consts" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" . "github.com/onsi/ginkgo/v2/dsl/core" . "github.com/onsi/gomega" "github.com/openshift/appliance/pkg/executer" diff --git a/pkg/syslinux/syslinux_test.go b/pkg/syslinux/syslinux_test.go index 65e7ff16..f329f12c 100644 --- a/pkg/syslinux/syslinux_test.go +++ b/pkg/syslinux/syslinux_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" . "github.com/onsi/ginkgo/v2/dsl/core" . "github.com/onsi/gomega" "github.com/openshift/appliance/pkg/executer"