From e7452144340413c82c76a6a5bcf219cf07c81b5a Mon Sep 17 00:00:00 2001 From: David Lee Date: Thu, 30 May 2024 17:15:51 -0400 Subject: [PATCH] Revert "OCM-6900 | go mod vendor required for release" This reverts commit beaa74e40e52b96945553cc83f6c24f025588a03. --- cmd/create/idp/mocks/identityprovider.go | 7 +- cmd/verify/rosa/cmd_mock.go | 7 +- go.mod | 2 - go.sum | 9 - pkg/aws/client_mock.go | 183 +++---- pkg/cache/cache_mock.go | 17 +- pkg/cache/service_mock.go | 15 +- pkg/clients/http_mock.go | 9 +- pkg/kubeletconfig/capability_checker_mock.go | 9 +- pkg/machinepool/machinepool_mock.go | 43 +- pkg/version/retriever_mock.go | 13 +- pkg/version/version_mock.go | 15 +- vendor/github.com/golang/mock/AUTHORS | 12 - vendor/github.com/golang/mock/CONTRIBUTORS | 37 -- vendor/github.com/golang/mock/LICENSE | 202 -------- vendor/github.com/golang/mock/gomock/call.go | 445 ------------------ .../github.com/golang/mock/gomock/callset.go | 113 ----- .../golang/mock/gomock/controller.go | 336 ------------- .../github.com/golang/mock/gomock/matchers.go | 341 -------------- vendor/modules.txt | 3 - 20 files changed, 170 insertions(+), 1648 deletions(-) delete mode 100644 vendor/github.com/golang/mock/AUTHORS delete mode 100644 vendor/github.com/golang/mock/CONTRIBUTORS delete mode 100644 vendor/github.com/golang/mock/LICENSE delete mode 100644 vendor/github.com/golang/mock/gomock/call.go delete mode 100644 vendor/github.com/golang/mock/gomock/callset.go delete mode 100644 vendor/github.com/golang/mock/gomock/controller.go delete mode 100644 vendor/github.com/golang/mock/gomock/matchers.go diff --git a/cmd/create/idp/mocks/identityprovider.go b/cmd/create/idp/mocks/identityprovider.go index a152046cbb..369c17b4de 100644 --- a/cmd/create/idp/mocks/identityprovider.go +++ b/cmd/create/idp/mocks/identityprovider.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: cmd.go +// +// Generated by this command: +// +// mockgen -source=cmd.go -package=mocks -destination=./mocks/identityprovider.go +// // Package mocks is a generated GoMock package. package mocks @@ -7,7 +12,7 @@ package mocks import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockIdentityProvider is a mock of IdentityProvider interface. diff --git a/cmd/verify/rosa/cmd_mock.go b/cmd/verify/rosa/cmd_mock.go index bc810b7916..4a19586ece 100644 --- a/cmd/verify/rosa/cmd_mock.go +++ b/cmd/verify/rosa/cmd_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: cmd.go +// +// Generated by this command: +// +// mockgen -source=cmd.go -package=rosa -destination=./cmd_mock.go +// // Package rosa is a generated GoMock package. package rosa @@ -7,7 +12,7 @@ package rosa import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockVerifyRosa is a mock of VerifyRosa interface. diff --git a/go.mod b/go.mod index 7455b380e8..fd739b7ca3 100644 --- a/go.mod +++ b/go.mod @@ -47,8 +47,6 @@ require ( k8s.io/utils v0.0.0-20230726121419-3b25d923346b ) -require github.com/golang/mock v1.6.0 // indirect - require ( github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect diff --git a/go.sum b/go.sum index e9c81480ac..755aef95f9 100644 --- a/go.sum +++ b/go.sum @@ -132,8 +132,6 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= @@ -330,7 +328,6 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zalando/go-keyring v0.2.3 h1:v9CUu9phlABObO4LPWycf+zwMG7nlbb3t/B5wa97yms= github.com/zalando/go-keyring v0.2.3/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= @@ -370,7 +367,6 @@ golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKG golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -380,7 +376,6 @@ golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -393,7 +388,6 @@ golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2 golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -409,9 +403,7 @@ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -452,7 +444,6 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= diff --git a/pkg/aws/client_mock.go b/pkg/aws/client_mock.go index d1b44056be..bcca70a022 100644 --- a/pkg/aws/client_mock.go +++ b/pkg/aws/client_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: client.go +// +// Generated by this command: +// +// mockgen -source=client.go -package=aws -destination=client_mock.go +// // Package aws is a generated GoMock package. package aws @@ -13,8 +18,8 @@ import ( iam "github.com/aws/aws-sdk-go-v2/service/iam" types0 "github.com/aws/aws-sdk-go-v2/service/iam/types" servicequotas "github.com/aws/aws-sdk-go-v2/service/servicequotas" - gomock "github.com/golang/mock/gomock" v1 "github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1" + gomock "go.uber.org/mock/gomock" ) // MockClient is a mock of Client interface. @@ -49,7 +54,7 @@ func (m *MockClient) AddRoleTag(roleName, key, value string) error { } // AddRoleTag indicates an expected call of AddRoleTag. -func (mr *MockClientMockRecorder) AddRoleTag(roleName, key, value interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) AddRoleTag(roleName, key, value any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRoleTag", reflect.TypeOf((*MockClient)(nil).AddRoleTag), roleName, key, value) } @@ -63,7 +68,7 @@ func (m *MockClient) AttachRolePolicy(roleName, policyARN string) error { } // AttachRolePolicy indicates an expected call of AttachRolePolicy. -func (mr *MockClientMockRecorder) AttachRolePolicy(roleName, policyARN interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) AttachRolePolicy(roleName, policyARN any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AttachRolePolicy", reflect.TypeOf((*MockClient)(nil).AttachRolePolicy), roleName, policyARN) } @@ -77,7 +82,7 @@ func (m *MockClient) CheckAdminUserExists(userName string) error { } // CheckAdminUserExists indicates an expected call of CheckAdminUserExists. -func (mr *MockClientMockRecorder) CheckAdminUserExists(userName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) CheckAdminUserExists(userName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAdminUserExists", reflect.TypeOf((*MockClient)(nil).CheckAdminUserExists), userName) } @@ -91,7 +96,7 @@ func (m *MockClient) CheckAdminUserNotExisting(userName string) error { } // CheckAdminUserNotExisting indicates an expected call of CheckAdminUserNotExisting. -func (mr *MockClientMockRecorder) CheckAdminUserNotExisting(userName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) CheckAdminUserNotExisting(userName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckAdminUserNotExisting", reflect.TypeOf((*MockClient)(nil).CheckAdminUserNotExisting), userName) } @@ -107,7 +112,7 @@ func (m *MockClient) CheckRoleExists(roleName string) (bool, string, error) { } // CheckRoleExists indicates an expected call of CheckRoleExists. -func (mr *MockClientMockRecorder) CheckRoleExists(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) CheckRoleExists(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckRoleExists", reflect.TypeOf((*MockClient)(nil).CheckRoleExists), roleName) } @@ -123,7 +128,7 @@ func (m *MockClient) CheckStackReadyOrNotExisting(stackName string) (bool, *stri } // CheckStackReadyOrNotExisting indicates an expected call of CheckStackReadyOrNotExisting. -func (mr *MockClientMockRecorder) CheckStackReadyOrNotExisting(stackName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) CheckStackReadyOrNotExisting(stackName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckStackReadyOrNotExisting", reflect.TypeOf((*MockClient)(nil).CheckStackReadyOrNotExisting), stackName) } @@ -138,7 +143,7 @@ func (m *MockClient) CreateOpenIDConnectProvider(issuerURL, thumbprint, clusterI } // CreateOpenIDConnectProvider indicates an expected call of CreateOpenIDConnectProvider. -func (mr *MockClientMockRecorder) CreateOpenIDConnectProvider(issuerURL, thumbprint, clusterID interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) CreateOpenIDConnectProvider(issuerURL, thumbprint, clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOpenIDConnectProvider", reflect.TypeOf((*MockClient)(nil).CreateOpenIDConnectProvider), issuerURL, thumbprint, clusterID) } @@ -152,7 +157,7 @@ func (m *MockClient) CreateS3Bucket(bucketName, region string) error { } // CreateS3Bucket indicates an expected call of CreateS3Bucket. -func (mr *MockClientMockRecorder) CreateS3Bucket(bucketName, region interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) CreateS3Bucket(bucketName, region any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateS3Bucket", reflect.TypeOf((*MockClient)(nil).CreateS3Bucket), bucketName, region) } @@ -167,7 +172,7 @@ func (m *MockClient) CreateSecretInSecretsManager(name, secret string) (string, } // CreateSecretInSecretsManager indicates an expected call of CreateSecretInSecretsManager. -func (mr *MockClientMockRecorder) CreateSecretInSecretsManager(name, secret interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) CreateSecretInSecretsManager(name, secret any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecretInSecretsManager", reflect.TypeOf((*MockClient)(nil).CreateSecretInSecretsManager), name, secret) } @@ -181,7 +186,7 @@ func (m *MockClient) DeleteAccountRole(roleName, prefix string, managedPolicies } // DeleteAccountRole indicates an expected call of DeleteAccountRole. -func (mr *MockClientMockRecorder) DeleteAccountRole(roleName, prefix, managedPolicies interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DeleteAccountRole(roleName, prefix, managedPolicies any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAccountRole", reflect.TypeOf((*MockClient)(nil).DeleteAccountRole), roleName, prefix, managedPolicies) } @@ -195,7 +200,7 @@ func (m *MockClient) DeleteInlineRolePolicies(roleName string) error { } // DeleteInlineRolePolicies indicates an expected call of DeleteInlineRolePolicies. -func (mr *MockClientMockRecorder) DeleteInlineRolePolicies(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DeleteInlineRolePolicies(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteInlineRolePolicies", reflect.TypeOf((*MockClient)(nil).DeleteInlineRolePolicies), roleName) } @@ -209,7 +214,7 @@ func (m *MockClient) DeleteOCMRole(roleARN string, managedPolicies bool) error { } // DeleteOCMRole indicates an expected call of DeleteOCMRole. -func (mr *MockClientMockRecorder) DeleteOCMRole(roleARN, managedPolicies interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DeleteOCMRole(roleARN, managedPolicies any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOCMRole", reflect.TypeOf((*MockClient)(nil).DeleteOCMRole), roleARN, managedPolicies) } @@ -223,7 +228,7 @@ func (m *MockClient) DeleteOpenIDConnectProvider(providerURL string) error { } // DeleteOpenIDConnectProvider indicates an expected call of DeleteOpenIDConnectProvider. -func (mr *MockClientMockRecorder) DeleteOpenIDConnectProvider(providerURL interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DeleteOpenIDConnectProvider(providerURL any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOpenIDConnectProvider", reflect.TypeOf((*MockClient)(nil).DeleteOpenIDConnectProvider), providerURL) } @@ -237,7 +242,7 @@ func (m *MockClient) DeleteOperatorRole(roles string, managedPolicies bool) erro } // DeleteOperatorRole indicates an expected call of DeleteOperatorRole. -func (mr *MockClientMockRecorder) DeleteOperatorRole(roles, managedPolicies interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DeleteOperatorRole(roles, managedPolicies any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOperatorRole", reflect.TypeOf((*MockClient)(nil).DeleteOperatorRole), roles, managedPolicies) } @@ -251,7 +256,7 @@ func (m *MockClient) DeleteOsdCcsAdminUser(stackName string) error { } // DeleteOsdCcsAdminUser indicates an expected call of DeleteOsdCcsAdminUser. -func (mr *MockClientMockRecorder) DeleteOsdCcsAdminUser(stackName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DeleteOsdCcsAdminUser(stackName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteOsdCcsAdminUser", reflect.TypeOf((*MockClient)(nil).DeleteOsdCcsAdminUser), stackName) } @@ -265,7 +270,7 @@ func (m *MockClient) DeleteS3Bucket(bucketName string) error { } // DeleteS3Bucket indicates an expected call of DeleteS3Bucket. -func (mr *MockClientMockRecorder) DeleteS3Bucket(bucketName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DeleteS3Bucket(bucketName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteS3Bucket", reflect.TypeOf((*MockClient)(nil).DeleteS3Bucket), bucketName) } @@ -279,7 +284,7 @@ func (m *MockClient) DeleteSecretInSecretsManager(secretArn string) error { } // DeleteSecretInSecretsManager indicates an expected call of DeleteSecretInSecretsManager. -func (mr *MockClientMockRecorder) DeleteSecretInSecretsManager(secretArn interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DeleteSecretInSecretsManager(secretArn any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecretInSecretsManager", reflect.TypeOf((*MockClient)(nil).DeleteSecretInSecretsManager), secretArn) } @@ -293,7 +298,7 @@ func (m *MockClient) DeleteUserRole(roleName string) error { } // DeleteUserRole indicates an expected call of DeleteUserRole. -func (mr *MockClientMockRecorder) DeleteUserRole(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DeleteUserRole(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUserRole", reflect.TypeOf((*MockClient)(nil).DeleteUserRole), roleName) } @@ -322,7 +327,7 @@ func (m *MockClient) DetachRolePolicies(roleName string) error { } // DetachRolePolicies indicates an expected call of DetachRolePolicies. -func (mr *MockClientMockRecorder) DetachRolePolicies(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DetachRolePolicies(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachRolePolicies", reflect.TypeOf((*MockClient)(nil).DetachRolePolicies), roleName) } @@ -336,7 +341,7 @@ func (m *MockClient) DetachRolePolicy(policyArn, roleName string) error { } // DetachRolePolicy indicates an expected call of DetachRolePolicy. -func (mr *MockClientMockRecorder) DetachRolePolicy(policyArn, roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) DetachRolePolicy(policyArn, roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DetachRolePolicy", reflect.TypeOf((*MockClient)(nil).DetachRolePolicy), policyArn, roleName) } @@ -351,7 +356,7 @@ func (m *MockClient) EnsureOsdCcsAdminUser(stackName, adminUserName, awsRegion s } // EnsureOsdCcsAdminUser indicates an expected call of EnsureOsdCcsAdminUser. -func (mr *MockClientMockRecorder) EnsureOsdCcsAdminUser(stackName, adminUserName, awsRegion interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) EnsureOsdCcsAdminUser(stackName, adminUserName, awsRegion any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureOsdCcsAdminUser", reflect.TypeOf((*MockClient)(nil).EnsureOsdCcsAdminUser), stackName, adminUserName, awsRegion) } @@ -366,7 +371,7 @@ func (m *MockClient) EnsurePolicy(policyArn, document, version string, tagList m } // EnsurePolicy indicates an expected call of EnsurePolicy. -func (mr *MockClientMockRecorder) EnsurePolicy(policyArn, document, version, tagList, path interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) EnsurePolicy(policyArn, document, version, tagList, path any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsurePolicy", reflect.TypeOf((*MockClient)(nil).EnsurePolicy), policyArn, document, version, tagList, path) } @@ -381,7 +386,7 @@ func (m *MockClient) EnsureRole(name, policy, permissionsBoundary, version strin } // EnsureRole indicates an expected call of EnsureRole. -func (mr *MockClientMockRecorder) EnsureRole(name, policy, permissionsBoundary, version, tagList, path, managedPolicies interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) EnsureRole(name, policy, permissionsBoundary, version, tagList, path, managedPolicies any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureRole", reflect.TypeOf((*MockClient)(nil).EnsureRole), name, policy, permissionsBoundary, version, tagList, path, managedPolicies) } @@ -396,7 +401,7 @@ func (m *MockClient) FetchPublicSubnetMap(subnets []types.Subnet) (map[string]bo } // FetchPublicSubnetMap indicates an expected call of FetchPublicSubnetMap. -func (mr *MockClientMockRecorder) FetchPublicSubnetMap(subnets interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) FetchPublicSubnetMap(subnets any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FetchPublicSubnetMap", reflect.TypeOf((*MockClient)(nil).FetchPublicSubnetMap), subnets) } @@ -411,7 +416,7 @@ func (m *MockClient) FilterVPCsPrivateSubnets(subnets []types.Subnet) ([]types.S } // FilterVPCsPrivateSubnets indicates an expected call of FilterVPCsPrivateSubnets. -func (mr *MockClientMockRecorder) FilterVPCsPrivateSubnets(subnets interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) FilterVPCsPrivateSubnets(subnets any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FilterVPCsPrivateSubnets", reflect.TypeOf((*MockClient)(nil).FilterVPCsPrivateSubnets), subnets) } @@ -426,7 +431,7 @@ func (m *MockClient) FindPolicyARN(operator Operator, version string) (string, e } // FindPolicyARN indicates an expected call of FindPolicyARN. -func (mr *MockClientMockRecorder) FindPolicyARN(operator, version interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) FindPolicyARN(operator, version any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindPolicyARN", reflect.TypeOf((*MockClient)(nil).FindPolicyARN), operator, version) } @@ -441,7 +446,7 @@ func (m *MockClient) FindRoleARNs(roleType, version string) ([]string, error) { } // FindRoleARNs indicates an expected call of FindRoleARNs. -func (mr *MockClientMockRecorder) FindRoleARNs(roleType, version interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) FindRoleARNs(roleType, version any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindRoleARNs", reflect.TypeOf((*MockClient)(nil).FindRoleARNs), roleType, version) } @@ -456,7 +461,7 @@ func (m *MockClient) FindRoleARNsClassic(roleType, version string) ([]string, er } // FindRoleARNsClassic indicates an expected call of FindRoleARNsClassic. -func (mr *MockClientMockRecorder) FindRoleARNsClassic(roleType, version interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) FindRoleARNsClassic(roleType, version any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindRoleARNsClassic", reflect.TypeOf((*MockClient)(nil).FindRoleARNsClassic), roleType, version) } @@ -471,7 +476,7 @@ func (m *MockClient) FindRoleARNsHostedCp(roleType, version string) ([]string, e } // FindRoleARNsHostedCp indicates an expected call of FindRoleARNsHostedCp. -func (mr *MockClientMockRecorder) FindRoleARNsHostedCp(roleType, version interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) FindRoleARNsHostedCp(roleType, version any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindRoleARNsHostedCp", reflect.TypeOf((*MockClient)(nil).FindRoleARNsHostedCp), roleType, version) } @@ -486,7 +491,7 @@ func (m *MockClient) ForceEnsurePolicy(policyArn, document, version string, tagL } // ForceEnsurePolicy indicates an expected call of ForceEnsurePolicy. -func (mr *MockClientMockRecorder) ForceEnsurePolicy(policyArn, document, version, tagList, path interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ForceEnsurePolicy(policyArn, document, version, tagList, path any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForceEnsurePolicy", reflect.TypeOf((*MockClient)(nil).ForceEnsurePolicy), policyArn, document, version, tagList, path) } @@ -516,7 +521,7 @@ func (m *MockClient) GetAccountRoleARN(prefix, roleType string) (string, error) } // GetAccountRoleARN indicates an expected call of GetAccountRoleARN. -func (mr *MockClientMockRecorder) GetAccountRoleARN(prefix, roleType interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetAccountRoleARN(prefix, roleType any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRoleARN", reflect.TypeOf((*MockClient)(nil).GetAccountRoleARN), prefix, roleType) } @@ -531,7 +536,7 @@ func (m *MockClient) GetAccountRoleByArn(roleArn string) (Role, error) { } // GetAccountRoleByArn indicates an expected call of GetAccountRoleByArn. -func (mr *MockClientMockRecorder) GetAccountRoleByArn(roleArn interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetAccountRoleByArn(roleArn any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRoleByArn", reflect.TypeOf((*MockClient)(nil).GetAccountRoleByArn), roleArn) } @@ -546,7 +551,7 @@ func (m *MockClient) GetAccountRoleDefaultPolicy(roleName, prefix string) (strin } // GetAccountRoleDefaultPolicy indicates an expected call of GetAccountRoleDefaultPolicy. -func (mr *MockClientMockRecorder) GetAccountRoleDefaultPolicy(roleName, prefix interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetAccountRoleDefaultPolicy(roleName, prefix any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRoleDefaultPolicy", reflect.TypeOf((*MockClient)(nil).GetAccountRoleDefaultPolicy), roleName, prefix) } @@ -561,7 +566,7 @@ func (m *MockClient) GetAccountRoleForCurrentEnv(env, roleName string) (Role, er } // GetAccountRoleForCurrentEnv indicates an expected call of GetAccountRoleForCurrentEnv. -func (mr *MockClientMockRecorder) GetAccountRoleForCurrentEnv(env, roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetAccountRoleForCurrentEnv(env, roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRoleForCurrentEnv", reflect.TypeOf((*MockClient)(nil).GetAccountRoleForCurrentEnv), env, roleName) } @@ -576,7 +581,7 @@ func (m *MockClient) GetAccountRoleForCurrentEnvWithPrefix(env, rolePrefix strin } // GetAccountRoleForCurrentEnvWithPrefix indicates an expected call of GetAccountRoleForCurrentEnvWithPrefix. -func (mr *MockClientMockRecorder) GetAccountRoleForCurrentEnvWithPrefix(env, rolePrefix, accountRolesMap interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetAccountRoleForCurrentEnvWithPrefix(env, rolePrefix, accountRolesMap any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRoleForCurrentEnvWithPrefix", reflect.TypeOf((*MockClient)(nil).GetAccountRoleForCurrentEnvWithPrefix), env, rolePrefix, accountRolesMap) } @@ -592,7 +597,7 @@ func (m *MockClient) GetAccountRolePolicies(roles []string, prefix string) (map[ } // GetAccountRolePolicies indicates an expected call of GetAccountRolePolicies. -func (mr *MockClientMockRecorder) GetAccountRolePolicies(roles, prefix interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetAccountRolePolicies(roles, prefix any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRolePolicies", reflect.TypeOf((*MockClient)(nil).GetAccountRolePolicies), roles, prefix) } @@ -607,7 +612,7 @@ func (m *MockClient) GetAccountRoleVersion(roleName string) (string, error) { } // GetAccountRoleVersion indicates an expected call of GetAccountRoleVersion. -func (mr *MockClientMockRecorder) GetAccountRoleVersion(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetAccountRoleVersion(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRoleVersion", reflect.TypeOf((*MockClient)(nil).GetAccountRoleVersion), roleName) } @@ -622,7 +627,7 @@ func (m *MockClient) GetAccountRolesForCurrentEnv(env, accountID string) ([]Role } // GetAccountRolesForCurrentEnv indicates an expected call of GetAccountRolesForCurrentEnv. -func (mr *MockClientMockRecorder) GetAccountRolesForCurrentEnv(env, accountID interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetAccountRolesForCurrentEnv(env, accountID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountRolesForCurrentEnv", reflect.TypeOf((*MockClient)(nil).GetAccountRolesForCurrentEnv), env, accountID) } @@ -637,7 +642,7 @@ func (m *MockClient) GetAttachedPolicy(role *string) ([]PolicyDetail, error) { } // GetAttachedPolicy indicates an expected call of GetAttachedPolicy. -func (mr *MockClientMockRecorder) GetAttachedPolicy(role interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetAttachedPolicy(role any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAttachedPolicy", reflect.TypeOf((*MockClient)(nil).GetAttachedPolicy), role) } @@ -652,7 +657,7 @@ func (m *MockClient) GetAvailabilityZoneType(availabilityZoneName string) (strin } // GetAvailabilityZoneType indicates an expected call of GetAvailabilityZoneType. -func (mr *MockClientMockRecorder) GetAvailabilityZoneType(availabilityZoneName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetAvailabilityZoneType(availabilityZoneName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAvailabilityZoneType", reflect.TypeOf((*MockClient)(nil).GetAvailabilityZoneType), availabilityZoneName) } @@ -667,7 +672,7 @@ func (m *MockClient) GetClusterRegionTagForUser(username string) (string, error) } // GetClusterRegionTagForUser indicates an expected call of GetClusterRegionTagForUser. -func (mr *MockClientMockRecorder) GetClusterRegionTagForUser(username interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetClusterRegionTagForUser(username any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterRegionTagForUser", reflect.TypeOf((*MockClient)(nil).GetClusterRegionTagForUser), username) } @@ -697,7 +702,7 @@ func (m *MockClient) GetDefaultPolicyDocument(policyArn string) (string, error) } // GetDefaultPolicyDocument indicates an expected call of GetDefaultPolicyDocument. -func (mr *MockClientMockRecorder) GetDefaultPolicyDocument(policyArn interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetDefaultPolicyDocument(policyArn any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDefaultPolicyDocument", reflect.TypeOf((*MockClient)(nil).GetDefaultPolicyDocument), policyArn) } @@ -727,7 +732,7 @@ func (m *MockClient) GetIAMServiceQuota(quotaCode string) (*servicequotas.GetSer } // GetIAMServiceQuota indicates an expected call of GetIAMServiceQuota. -func (mr *MockClientMockRecorder) GetIAMServiceQuota(quotaCode interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetIAMServiceQuota(quotaCode any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetIAMServiceQuota", reflect.TypeOf((*MockClient)(nil).GetIAMServiceQuota), quotaCode) } @@ -742,7 +747,7 @@ func (m *MockClient) GetInstanceProfilesForRole(role string) ([]string, error) { } // GetInstanceProfilesForRole indicates an expected call of GetInstanceProfilesForRole. -func (mr *MockClientMockRecorder) GetInstanceProfilesForRole(role interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetInstanceProfilesForRole(role any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetInstanceProfilesForRole", reflect.TypeOf((*MockClient)(nil).GetInstanceProfilesForRole), role) } @@ -772,7 +777,7 @@ func (m *MockClient) GetOpenIDConnectProviderByClusterIdTag(clusterID string) (s } // GetOpenIDConnectProviderByClusterIdTag indicates an expected call of GetOpenIDConnectProviderByClusterIdTag. -func (mr *MockClientMockRecorder) GetOpenIDConnectProviderByClusterIdTag(clusterID interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetOpenIDConnectProviderByClusterIdTag(clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOpenIDConnectProviderByClusterIdTag", reflect.TypeOf((*MockClient)(nil).GetOpenIDConnectProviderByClusterIdTag), clusterID) } @@ -787,7 +792,7 @@ func (m *MockClient) GetOpenIDConnectProviderByOidcEndpointUrl(oidcEndpointUrl s } // GetOpenIDConnectProviderByOidcEndpointUrl indicates an expected call of GetOpenIDConnectProviderByOidcEndpointUrl. -func (mr *MockClientMockRecorder) GetOpenIDConnectProviderByOidcEndpointUrl(oidcEndpointUrl interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetOpenIDConnectProviderByOidcEndpointUrl(oidcEndpointUrl any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOpenIDConnectProviderByOidcEndpointUrl", reflect.TypeOf((*MockClient)(nil).GetOpenIDConnectProviderByOidcEndpointUrl), oidcEndpointUrl) } @@ -802,7 +807,7 @@ func (m *MockClient) GetOperatorRoleDefaultPolicy(roleName string) (string, erro } // GetOperatorRoleDefaultPolicy indicates an expected call of GetOperatorRoleDefaultPolicy. -func (mr *MockClientMockRecorder) GetOperatorRoleDefaultPolicy(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetOperatorRoleDefaultPolicy(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorRoleDefaultPolicy", reflect.TypeOf((*MockClient)(nil).GetOperatorRoleDefaultPolicy), roleName) } @@ -818,7 +823,7 @@ func (m *MockClient) GetOperatorRolePolicies(roles []string) (map[string][]strin } // GetOperatorRolePolicies indicates an expected call of GetOperatorRolePolicies. -func (mr *MockClientMockRecorder) GetOperatorRolePolicies(roles interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetOperatorRolePolicies(roles any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorRolePolicies", reflect.TypeOf((*MockClient)(nil).GetOperatorRolePolicies), roles) } @@ -833,7 +838,7 @@ func (m *MockClient) GetOperatorRolesFromAccountByClusterID(clusterID string, cr } // GetOperatorRolesFromAccountByClusterID indicates an expected call of GetOperatorRolesFromAccountByClusterID. -func (mr *MockClientMockRecorder) GetOperatorRolesFromAccountByClusterID(clusterID, credRequests interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetOperatorRolesFromAccountByClusterID(clusterID, credRequests any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorRolesFromAccountByClusterID", reflect.TypeOf((*MockClient)(nil).GetOperatorRolesFromAccountByClusterID), clusterID, credRequests) } @@ -848,7 +853,7 @@ func (m *MockClient) GetOperatorRolesFromAccountByPrefix(prefix string, credRequ } // GetOperatorRolesFromAccountByPrefix indicates an expected call of GetOperatorRolesFromAccountByPrefix. -func (mr *MockClientMockRecorder) GetOperatorRolesFromAccountByPrefix(prefix, credRequest interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetOperatorRolesFromAccountByPrefix(prefix, credRequest any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOperatorRolesFromAccountByPrefix", reflect.TypeOf((*MockClient)(nil).GetOperatorRolesFromAccountByPrefix), prefix, credRequest) } @@ -877,7 +882,7 @@ func (m *MockClient) GetRoleARNPath(prefix string) (string, error) { } // GetRoleARNPath indicates an expected call of GetRoleARNPath. -func (mr *MockClientMockRecorder) GetRoleARNPath(prefix interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetRoleARNPath(prefix any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRoleARNPath", reflect.TypeOf((*MockClient)(nil).GetRoleARNPath), prefix) } @@ -892,7 +897,7 @@ func (m *MockClient) GetRoleByARN(roleARN string) (types0.Role, error) { } // GetRoleByARN indicates an expected call of GetRoleByARN. -func (mr *MockClientMockRecorder) GetRoleByARN(roleARN interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetRoleByARN(roleARN any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRoleByARN", reflect.TypeOf((*MockClient)(nil).GetRoleByARN), roleARN) } @@ -907,7 +912,7 @@ func (m *MockClient) GetRoleByName(roleName string) (types0.Role, error) { } // GetRoleByName indicates an expected call of GetRoleByName. -func (mr *MockClientMockRecorder) GetRoleByName(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetRoleByName(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRoleByName", reflect.TypeOf((*MockClient)(nil).GetRoleByName), roleName) } @@ -922,7 +927,7 @@ func (m *MockClient) GetSecurityGroupIds(vpcId string) ([]types.SecurityGroup, e } // GetSecurityGroupIds indicates an expected call of GetSecurityGroupIds. -func (mr *MockClientMockRecorder) GetSecurityGroupIds(vpcId interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetSecurityGroupIds(vpcId any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecurityGroupIds", reflect.TypeOf((*MockClient)(nil).GetSecurityGroupIds), vpcId) } @@ -937,7 +942,7 @@ func (m *MockClient) GetSubnetAvailabilityZone(subnetID string) (string, error) } // GetSubnetAvailabilityZone indicates an expected call of GetSubnetAvailabilityZone. -func (mr *MockClientMockRecorder) GetSubnetAvailabilityZone(subnetID interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetSubnetAvailabilityZone(subnetID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubnetAvailabilityZone", reflect.TypeOf((*MockClient)(nil).GetSubnetAvailabilityZone), subnetID) } @@ -952,7 +957,7 @@ func (m *MockClient) GetVPCPrivateSubnets(subnetID string) ([]types.Subnet, erro } // GetVPCPrivateSubnets indicates an expected call of GetVPCPrivateSubnets. -func (mr *MockClientMockRecorder) GetVPCPrivateSubnets(subnetID interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetVPCPrivateSubnets(subnetID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVPCPrivateSubnets", reflect.TypeOf((*MockClient)(nil).GetVPCPrivateSubnets), subnetID) } @@ -967,7 +972,7 @@ func (m *MockClient) GetVPCSubnets(subnetID string) ([]types.Subnet, error) { } // GetVPCSubnets indicates an expected call of GetVPCSubnets. -func (mr *MockClientMockRecorder) GetVPCSubnets(subnetID interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetVPCSubnets(subnetID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetVPCSubnets", reflect.TypeOf((*MockClient)(nil).GetVPCSubnets), subnetID) } @@ -982,7 +987,7 @@ func (m *MockClient) HasHostedCPPolicies(roleARN string) (bool, error) { } // HasHostedCPPolicies indicates an expected call of HasHostedCPPolicies. -func (mr *MockClientMockRecorder) HasHostedCPPolicies(roleARN interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) HasHostedCPPolicies(roleARN any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasHostedCPPolicies", reflect.TypeOf((*MockClient)(nil).HasHostedCPPolicies), roleARN) } @@ -997,7 +1002,7 @@ func (m *MockClient) HasManagedPolicies(roleARN string) (bool, error) { } // HasManagedPolicies indicates an expected call of HasManagedPolicies. -func (mr *MockClientMockRecorder) HasManagedPolicies(roleARN interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) HasManagedPolicies(roleARN any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasManagedPolicies", reflect.TypeOf((*MockClient)(nil).HasManagedPolicies), roleARN) } @@ -1012,7 +1017,7 @@ func (m *MockClient) HasOpenIDConnectProvider(issuerURL, partition, accountID st } // HasOpenIDConnectProvider indicates an expected call of HasOpenIDConnectProvider. -func (mr *MockClientMockRecorder) HasOpenIDConnectProvider(issuerURL, partition, accountID interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) HasOpenIDConnectProvider(issuerURL, partition, accountID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasOpenIDConnectProvider", reflect.TypeOf((*MockClient)(nil).HasOpenIDConnectProvider), issuerURL, partition, accountID) } @@ -1027,7 +1032,7 @@ func (m *MockClient) HasPermissionsBoundary(roleName string) (bool, error) { } // HasPermissionsBoundary indicates an expected call of HasPermissionsBoundary. -func (mr *MockClientMockRecorder) HasPermissionsBoundary(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) HasPermissionsBoundary(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermissionsBoundary", reflect.TypeOf((*MockClient)(nil).HasPermissionsBoundary), roleName) } @@ -1042,7 +1047,7 @@ func (m *MockClient) IsAdminRole(roleName string) (bool, error) { } // IsAdminRole indicates an expected call of IsAdminRole. -func (mr *MockClientMockRecorder) IsAdminRole(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) IsAdminRole(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAdminRole", reflect.TypeOf((*MockClient)(nil).IsAdminRole), roleName) } @@ -1057,7 +1062,7 @@ func (m *MockClient) IsLocalAvailabilityZone(availabilityZoneName string) (bool, } // IsLocalAvailabilityZone indicates an expected call of IsLocalAvailabilityZone. -func (mr *MockClientMockRecorder) IsLocalAvailabilityZone(availabilityZoneName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) IsLocalAvailabilityZone(availabilityZoneName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLocalAvailabilityZone", reflect.TypeOf((*MockClient)(nil).IsLocalAvailabilityZone), availabilityZoneName) } @@ -1072,7 +1077,7 @@ func (m *MockClient) IsPolicyCompatible(policyArn, version string) (bool, error) } // IsPolicyCompatible indicates an expected call of IsPolicyCompatible. -func (mr *MockClientMockRecorder) IsPolicyCompatible(policyArn, version interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) IsPolicyCompatible(policyArn, version any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPolicyCompatible", reflect.TypeOf((*MockClient)(nil).IsPolicyCompatible), policyArn, version) } @@ -1087,7 +1092,7 @@ func (m *MockClient) IsPolicyExists(policyARN string) (*iam.GetPolicyOutput, err } // IsPolicyExists indicates an expected call of IsPolicyExists. -func (mr *MockClientMockRecorder) IsPolicyExists(policyARN interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) IsPolicyExists(policyARN any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsPolicyExists", reflect.TypeOf((*MockClient)(nil).IsPolicyExists), policyARN) } @@ -1102,7 +1107,7 @@ func (m *MockClient) IsRolePolicyExists(roleName, policyName string) (*iam.GetRo } // IsRolePolicyExists indicates an expected call of IsRolePolicyExists. -func (mr *MockClientMockRecorder) IsRolePolicyExists(roleName, policyName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) IsRolePolicyExists(roleName, policyName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRolePolicyExists", reflect.TypeOf((*MockClient)(nil).IsRolePolicyExists), roleName, policyName) } @@ -1117,7 +1122,7 @@ func (m *MockClient) IsUpgradedNeededForAccountRolePolicies(rolePrefix, version } // IsUpgradedNeededForAccountRolePolicies indicates an expected call of IsUpgradedNeededForAccountRolePolicies. -func (mr *MockClientMockRecorder) IsUpgradedNeededForAccountRolePolicies(rolePrefix, version interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) IsUpgradedNeededForAccountRolePolicies(rolePrefix, version any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgradedNeededForAccountRolePolicies", reflect.TypeOf((*MockClient)(nil).IsUpgradedNeededForAccountRolePolicies), rolePrefix, version) } @@ -1132,7 +1137,7 @@ func (m *MockClient) IsUpgradedNeededForAccountRolePoliciesUsingCluster(clusterI } // IsUpgradedNeededForAccountRolePoliciesUsingCluster indicates an expected call of IsUpgradedNeededForAccountRolePoliciesUsingCluster. -func (mr *MockClientMockRecorder) IsUpgradedNeededForAccountRolePoliciesUsingCluster(clusterID, version interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) IsUpgradedNeededForAccountRolePoliciesUsingCluster(clusterID, version any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgradedNeededForAccountRolePoliciesUsingCluster", reflect.TypeOf((*MockClient)(nil).IsUpgradedNeededForAccountRolePoliciesUsingCluster), clusterID, version) } @@ -1147,7 +1152,7 @@ func (m *MockClient) IsUpgradedNeededForOperatorRolePoliciesUsingCluster(cluster } // IsUpgradedNeededForOperatorRolePoliciesUsingCluster indicates an expected call of IsUpgradedNeededForOperatorRolePoliciesUsingCluster. -func (mr *MockClientMockRecorder) IsUpgradedNeededForOperatorRolePoliciesUsingCluster(cluster, partition, accountID, version, credRequests, operatorRolePolicyPrefix interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) IsUpgradedNeededForOperatorRolePoliciesUsingCluster(cluster, partition, accountID, version, credRequests, operatorRolePolicyPrefix any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgradedNeededForOperatorRolePoliciesUsingCluster", reflect.TypeOf((*MockClient)(nil).IsUpgradedNeededForOperatorRolePoliciesUsingCluster), cluster, partition, accountID, version, credRequests, operatorRolePolicyPrefix) } @@ -1162,7 +1167,7 @@ func (m *MockClient) IsUpgradedNeededForOperatorRolePoliciesUsingPrefix(rolePref } // IsUpgradedNeededForOperatorRolePoliciesUsingPrefix indicates an expected call of IsUpgradedNeededForOperatorRolePoliciesUsingPrefix. -func (mr *MockClientMockRecorder) IsUpgradedNeededForOperatorRolePoliciesUsingPrefix(rolePrefix, partition, accountID, version, credRequests, path interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) IsUpgradedNeededForOperatorRolePoliciesUsingPrefix(rolePrefix, partition, accountID, version, credRequests, path any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUpgradedNeededForOperatorRolePoliciesUsingPrefix", reflect.TypeOf((*MockClient)(nil).IsUpgradedNeededForOperatorRolePoliciesUsingPrefix), rolePrefix, partition, accountID, version, credRequests, path) } @@ -1177,7 +1182,7 @@ func (m *MockClient) IsUserRole(roleName *string) (bool, error) { } // IsUserRole indicates an expected call of IsUserRole. -func (mr *MockClientMockRecorder) IsUserRole(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) IsUserRole(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUserRole", reflect.TypeOf((*MockClient)(nil).IsUserRole), roleName) } @@ -1192,7 +1197,7 @@ func (m *MockClient) ListAccountRoles(version string) ([]Role, error) { } // ListAccountRoles indicates an expected call of ListAccountRoles. -func (mr *MockClientMockRecorder) ListAccountRoles(version interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ListAccountRoles(version any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAccountRoles", reflect.TypeOf((*MockClient)(nil).ListAccountRoles), version) } @@ -1207,7 +1212,7 @@ func (m *MockClient) ListAttachedRolePolicies(roleName string) ([]string, error) } // ListAttachedRolePolicies indicates an expected call of ListAttachedRolePolicies. -func (mr *MockClientMockRecorder) ListAttachedRolePolicies(roleName interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ListAttachedRolePolicies(roleName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAttachedRolePolicies", reflect.TypeOf((*MockClient)(nil).ListAttachedRolePolicies), roleName) } @@ -1237,7 +1242,7 @@ func (m *MockClient) ListOidcProviders(targetClusterId string, config *v1.OidcCo } // ListOidcProviders indicates an expected call of ListOidcProviders. -func (mr *MockClientMockRecorder) ListOidcProviders(targetClusterId, config interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ListOidcProviders(targetClusterId, config any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOidcProviders", reflect.TypeOf((*MockClient)(nil).ListOidcProviders), targetClusterId, config) } @@ -1252,7 +1257,7 @@ func (m *MockClient) ListOperatorRoles(version, clusterID string) (map[string][] } // ListOperatorRoles indicates an expected call of ListOperatorRoles. -func (mr *MockClientMockRecorder) ListOperatorRoles(version, clusterID interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ListOperatorRoles(version, clusterID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListOperatorRoles", reflect.TypeOf((*MockClient)(nil).ListOperatorRoles), version, clusterID) } @@ -1260,7 +1265,7 @@ func (mr *MockClientMockRecorder) ListOperatorRoles(version, clusterID interface // ListSubnets mocks base method. func (m *MockClient) ListSubnets(subnetIds ...string) ([]types.Subnet, error) { m.ctrl.T.Helper() - varargs := []interface{}{} + varargs := []any{} for _, a := range subnetIds { varargs = append(varargs, a) } @@ -1271,7 +1276,7 @@ func (m *MockClient) ListSubnets(subnetIds ...string) ([]types.Subnet, error) { } // ListSubnets indicates an expected call of ListSubnets. -func (mr *MockClientMockRecorder) ListSubnets(subnetIds ...interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ListSubnets(subnetIds ...any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListSubnets", reflect.TypeOf((*MockClient)(nil).ListSubnets), subnetIds...) } @@ -1300,7 +1305,7 @@ func (m *MockClient) PutPublicReadObjectInS3Bucket(bucketName string, body io.Re } // PutPublicReadObjectInS3Bucket indicates an expected call of PutPublicReadObjectInS3Bucket. -func (mr *MockClientMockRecorder) PutPublicReadObjectInS3Bucket(bucketName, body, key interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) PutPublicReadObjectInS3Bucket(bucketName, body, key any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutPublicReadObjectInS3Bucket", reflect.TypeOf((*MockClient)(nil).PutPublicReadObjectInS3Bucket), bucketName, body, key) } @@ -1314,7 +1319,7 @@ func (m *MockClient) PutRolePolicy(roleName, policyName, policy string) error { } // PutRolePolicy indicates an expected call of PutRolePolicy. -func (mr *MockClientMockRecorder) PutRolePolicy(roleName, policyName, policy interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) PutRolePolicy(roleName, policyName, policy any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PutRolePolicy", reflect.TypeOf((*MockClient)(nil).PutRolePolicy), roleName, policyName, policy) } @@ -1328,7 +1333,7 @@ func (m *MockClient) TagUserRegion(username, region string) error { } // TagUserRegion indicates an expected call of TagUserRegion. -func (mr *MockClientMockRecorder) TagUserRegion(username, region interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) TagUserRegion(username, region any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TagUserRegion", reflect.TypeOf((*MockClient)(nil).TagUserRegion), username, region) } @@ -1342,7 +1347,7 @@ func (m *MockClient) UpdateTag(roleName, defaultPolicyVersion string) error { } // UpdateTag indicates an expected call of UpdateTag. -func (mr *MockClientMockRecorder) UpdateTag(roleName, defaultPolicyVersion interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) UpdateTag(roleName, defaultPolicyVersion any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateTag", reflect.TypeOf((*MockClient)(nil).UpdateTag), roleName, defaultPolicyVersion) } @@ -1357,7 +1362,7 @@ func (m *MockClient) ValidateAccountRoleVersionCompatibility(roleName, roleType, } // ValidateAccountRoleVersionCompatibility indicates an expected call of ValidateAccountRoleVersionCompatibility. -func (mr *MockClientMockRecorder) ValidateAccountRoleVersionCompatibility(roleName, roleType, minVersion interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ValidateAccountRoleVersionCompatibility(roleName, roleType, minVersion any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateAccountRoleVersionCompatibility", reflect.TypeOf((*MockClient)(nil).ValidateAccountRoleVersionCompatibility), roleName, roleType, minVersion) } @@ -1371,7 +1376,7 @@ func (m *MockClient) ValidateAccountRolesManagedPolicies(prefix string, policies } // ValidateAccountRolesManagedPolicies indicates an expected call of ValidateAccountRolesManagedPolicies. -func (mr *MockClientMockRecorder) ValidateAccountRolesManagedPolicies(prefix, policies interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ValidateAccountRolesManagedPolicies(prefix, policies any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateAccountRolesManagedPolicies", reflect.TypeOf((*MockClient)(nil).ValidateAccountRolesManagedPolicies), prefix, policies) } @@ -1400,7 +1405,7 @@ func (m *MockClient) ValidateHCPAccountRolesManagedPolicies(prefix string, polic } // ValidateHCPAccountRolesManagedPolicies indicates an expected call of ValidateHCPAccountRolesManagedPolicies. -func (mr *MockClientMockRecorder) ValidateHCPAccountRolesManagedPolicies(prefix, policies interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ValidateHCPAccountRolesManagedPolicies(prefix, policies any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateHCPAccountRolesManagedPolicies", reflect.TypeOf((*MockClient)(nil).ValidateHCPAccountRolesManagedPolicies), prefix, policies) } @@ -1414,7 +1419,7 @@ func (m *MockClient) ValidateOperatorRolesManagedPolicies(cluster *v1.Cluster, o } // ValidateOperatorRolesManagedPolicies indicates an expected call of ValidateOperatorRolesManagedPolicies. -func (mr *MockClientMockRecorder) ValidateOperatorRolesManagedPolicies(cluster, operatorRoles, policies, hostedCPPolicies interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ValidateOperatorRolesManagedPolicies(cluster, operatorRoles, policies, hostedCPPolicies any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateOperatorRolesManagedPolicies", reflect.TypeOf((*MockClient)(nil).ValidateOperatorRolesManagedPolicies), cluster, operatorRoles, policies, hostedCPPolicies) } @@ -1443,7 +1448,7 @@ func (m *MockClient) ValidateRoleARNAccountIDMatchCallerAccountID(roleARN string } // ValidateRoleARNAccountIDMatchCallerAccountID indicates an expected call of ValidateRoleARNAccountIDMatchCallerAccountID. -func (mr *MockClientMockRecorder) ValidateRoleARNAccountIDMatchCallerAccountID(roleARN interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ValidateRoleARNAccountIDMatchCallerAccountID(roleARN any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateRoleARNAccountIDMatchCallerAccountID", reflect.TypeOf((*MockClient)(nil).ValidateRoleARNAccountIDMatchCallerAccountID), roleARN) } @@ -1457,7 +1462,7 @@ func (m *MockClient) ValidateRoleNameAvailable(name string) error { } // ValidateRoleNameAvailable indicates an expected call of ValidateRoleNameAvailable. -func (mr *MockClientMockRecorder) ValidateRoleNameAvailable(name interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ValidateRoleNameAvailable(name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateRoleNameAvailable", reflect.TypeOf((*MockClient)(nil).ValidateRoleNameAvailable), name) } @@ -1472,7 +1477,7 @@ func (m *MockClient) ValidateSCP(arg0 *string, arg1 map[string]*v1.AWSSTSPolicy) } // ValidateSCP indicates an expected call of ValidateSCP. -func (mr *MockClientMockRecorder) ValidateSCP(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) ValidateSCP(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ValidateSCP", reflect.TypeOf((*MockClient)(nil).ValidateSCP), arg0, arg1) } diff --git a/pkg/cache/cache_mock.go b/pkg/cache/cache_mock.go index 76ae3036c5..90c48e63ab 100644 --- a/pkg/cache/cache_mock.go +++ b/pkg/cache/cache_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: cache.go +// +// Generated by this command: +// +// mockgen -source=cache.go -package=cache -destination=./cache_mock.go +// // Package cache is a generated GoMock package. package cache @@ -8,7 +13,7 @@ import ( reflect "reflect" time "time" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockRosaCache is a mock of RosaCache interface. @@ -50,16 +55,16 @@ func (mr *MockRosaCacheMockRecorder) Dir() *gomock.Call { } // Get mocks base method. -func (m *MockRosaCache) Get(k string) (interface{}, bool) { +func (m *MockRosaCache) Get(k string) (any, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", k) - ret0, _ := ret[0].(interface{}) + ret0, _ := ret[0].(any) ret1, _ := ret[1].(bool) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockRosaCacheMockRecorder) Get(k interface{}) *gomock.Call { +func (mr *MockRosaCacheMockRecorder) Get(k any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRosaCache)(nil).Get), k) } @@ -79,13 +84,13 @@ func (mr *MockRosaCacheMockRecorder) Items() *gomock.Call { } // Set mocks base method. -func (m *MockRosaCache) Set(k string, x interface{}, d time.Time) { +func (m *MockRosaCache) Set(k string, x any, d time.Time) { m.ctrl.T.Helper() m.ctrl.Call(m, "Set", k, x, d) } // Set indicates an expected call of Set. -func (mr *MockRosaCacheMockRecorder) Set(k, x, d interface{}) *gomock.Call { +func (mr *MockRosaCacheMockRecorder) Set(k, x, d any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockRosaCache)(nil).Set), k, x, d) } diff --git a/pkg/cache/service_mock.go b/pkg/cache/service_mock.go index 5d8419466c..3d490d33c9 100644 --- a/pkg/cache/service_mock.go +++ b/pkg/cache/service_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: service.go +// +// Generated by this command: +// +// mockgen -source=service.go -package=cache -destination=./service_mock.go +// // Package cache is a generated GoMock package. package cache @@ -7,7 +12,7 @@ package cache import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockRosaCacheService is a mock of RosaCacheService interface. @@ -34,16 +39,16 @@ func (m *MockRosaCacheService) EXPECT() *MockRosaCacheServiceMockRecorder { } // Get mocks base method. -func (m *MockRosaCacheService) Get(key string) (interface{}, bool) { +func (m *MockRosaCacheService) Get(key string) (any, bool) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get", key) - ret0, _ := ret[0].(interface{}) + ret0, _ := ret[0].(any) ret1, _ := ret[1].(bool) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockRosaCacheServiceMockRecorder) Get(key interface{}) *gomock.Call { +func (mr *MockRosaCacheServiceMockRecorder) Get(key any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockRosaCacheService)(nil).Get), key) } @@ -72,7 +77,7 @@ func (m *MockRosaCacheService) Set(key string, value []string) error { } // Set indicates an expected call of Set. -func (mr *MockRosaCacheServiceMockRecorder) Set(key, value interface{}) *gomock.Call { +func (mr *MockRosaCacheServiceMockRecorder) Set(key, value any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockRosaCacheService)(nil).Set), key, value) } diff --git a/pkg/clients/http_mock.go b/pkg/clients/http_mock.go index f3ef06269b..2a91737b07 100644 --- a/pkg/clients/http_mock.go +++ b/pkg/clients/http_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: http.go +// +// Generated by this command: +// +// mockgen -source=http.go -package=clients -destination=./http_mock.go +// // Package clients is a generated GoMock package. package clients @@ -8,7 +13,7 @@ import ( http "net/http" reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockHTTPClient is a mock of HTTPClient interface. @@ -44,7 +49,7 @@ func (m *MockHTTPClient) Get(url string) (*http.Response, error) { } // Get indicates an expected call of Get. -func (mr *MockHTTPClientMockRecorder) Get(url interface{}) *gomock.Call { +func (mr *MockHTTPClientMockRecorder) Get(url any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockHTTPClient)(nil).Get), url) } diff --git a/pkg/kubeletconfig/capability_checker_mock.go b/pkg/kubeletconfig/capability_checker_mock.go index c200fb8038..1152881958 100644 --- a/pkg/kubeletconfig/capability_checker_mock.go +++ b/pkg/kubeletconfig/capability_checker_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: config.go +// +// Generated by this command: +// +// mockgen -source=config.go -package=kubeletconfig -destination=capability_checker_mock.go +// // Package kubeletconfig is a generated GoMock package. package kubeletconfig @@ -7,7 +12,7 @@ package kubeletconfig import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockCapabilityChecker is a mock of CapabilityChecker interface. @@ -43,7 +48,7 @@ func (m *MockCapabilityChecker) IsCapabilityEnabled(capability string) (bool, er } // IsCapabilityEnabled indicates an expected call of IsCapabilityEnabled. -func (mr *MockCapabilityCheckerMockRecorder) IsCapabilityEnabled(capability interface{}) *gomock.Call { +func (mr *MockCapabilityCheckerMockRecorder) IsCapabilityEnabled(capability any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsCapabilityEnabled", reflect.TypeOf((*MockCapabilityChecker)(nil).IsCapabilityEnabled), capability) } diff --git a/pkg/machinepool/machinepool_mock.go b/pkg/machinepool/machinepool_mock.go index 0e4ae0aba7..7d03778e88 100644 --- a/pkg/machinepool/machinepool_mock.go +++ b/pkg/machinepool/machinepool_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: machinepool.go +// +// Generated by this command: +// +// mockgen -source=machinepool.go -package=machinepool -destination=machinepool_mock.go +// // Package machinepool is a generated GoMock package. package machinepool @@ -7,9 +12,9 @@ package machinepool import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" v1 "github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1" rosa "github.com/openshift/rosa/pkg/rosa" + gomock "go.uber.org/mock/gomock" ) // MockMachinePoolService is a mock of MachinePoolService interface. @@ -35,44 +40,16 @@ func (m *MockMachinePoolService) EXPECT() *MockMachinePoolServiceMockRecorder { return m.recorder } -// DeleteMachinePool mocks base method. -func (m *MockMachinePoolService) DeleteMachinePool(r *rosa.Runtime, machinePoolId, clusterKey string, cluster *v1.Cluster) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteMachinePool", r, machinePoolId, clusterKey, cluster) - ret0, _ := ret[0].(error) - return ret0 -} - -// DeleteMachinePool indicates an expected call of DeleteMachinePool. -func (mr *MockMachinePoolServiceMockRecorder) DeleteMachinePool(r, machinePoolId, clusterKey, cluster interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMachinePool", reflect.TypeOf((*MockMachinePoolService)(nil).DeleteMachinePool), r, machinePoolId, clusterKey, cluster) -} - // DescribeMachinePool mocks base method. -func (m *MockMachinePoolService) DescribeMachinePool(r *rosa.Runtime, cluster *v1.Cluster, clusterKey, machinePoolId string) error { +func (m *MockMachinePoolService) DescribeMachinePool(r *rosa.Runtime, cluster *v1.Cluster, clusterKey string, isHypershift bool, machinePoolId string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DescribeMachinePool", r, cluster, clusterKey, machinePoolId) + ret := m.ctrl.Call(m, "DescribeMachinePool", r, cluster, clusterKey, isHypershift, machinePoolId) ret0, _ := ret[0].(error) return ret0 } // DescribeMachinePool indicates an expected call of DescribeMachinePool. -func (mr *MockMachinePoolServiceMockRecorder) DescribeMachinePool(r, cluster, clusterKey, machinePoolId interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeMachinePool", reflect.TypeOf((*MockMachinePoolService)(nil).DescribeMachinePool), r, cluster, clusterKey, machinePoolId) -} - -// ListMachinePools mocks base method. -func (m *MockMachinePoolService) ListMachinePools(r *rosa.Runtime, clusterKey string, cluster *v1.Cluster) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListMachinePools", r, clusterKey, cluster) - ret0, _ := ret[0].(error) - return ret0 -} - -// ListMachinePools indicates an expected call of ListMachinePools. -func (mr *MockMachinePoolServiceMockRecorder) ListMachinePools(r, clusterKey, cluster interface{}) *gomock.Call { +func (mr *MockMachinePoolServiceMockRecorder) DescribeMachinePool(r, cluster, clusterKey, isHypershift, machinePoolId any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMachinePools", reflect.TypeOf((*MockMachinePoolService)(nil).ListMachinePools), r, clusterKey, cluster) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeMachinePool", reflect.TypeOf((*MockMachinePoolService)(nil).DescribeMachinePool), r, cluster, clusterKey, isHypershift, machinePoolId) } diff --git a/pkg/version/retriever_mock.go b/pkg/version/retriever_mock.go index 9606d11e8c..c2c3efb085 100644 --- a/pkg/version/retriever_mock.go +++ b/pkg/version/retriever_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: retriever.go +// +// Generated by this command: +// +// mockgen -source=retriever.go -package=version -destination=./retriever_mock.go +// // Package version is a generated GoMock package. package version @@ -7,8 +12,8 @@ package version import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" - go_version "github.com/hashicorp/go-version" + version "github.com/hashicorp/go-version" + gomock "go.uber.org/mock/gomock" ) // MockRetriever is a mock of Retriever interface. @@ -35,10 +40,10 @@ func (m *MockRetriever) EXPECT() *MockRetrieverMockRecorder { } // RetrieveLatestVersionFromMirror mocks base method. -func (m *MockRetriever) RetrieveLatestVersionFromMirror() (*go_version.Version, error) { +func (m *MockRetriever) RetrieveLatestVersionFromMirror() (*version.Version, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RetrieveLatestVersionFromMirror") - ret0, _ := ret[0].(*go_version.Version) + ret0, _ := ret[0].(*version.Version) ret1, _ := ret[1].(error) return ret0, ret1 } diff --git a/pkg/version/version_mock.go b/pkg/version/version_mock.go index f00dcf216c..2180c03e5f 100644 --- a/pkg/version/version_mock.go +++ b/pkg/version/version_mock.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: version.go +// +// Generated by this command: +// +// mockgen -source=version.go -package=version -destination=./version_mock.go +// // Package version is a generated GoMock package. package version @@ -7,8 +12,8 @@ package version import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" - go_version "github.com/hashicorp/go-version" + version "github.com/hashicorp/go-version" + gomock "go.uber.org/mock/gomock" ) // MockRosaVersion is a mock of RosaVersion interface. @@ -35,17 +40,17 @@ func (m *MockRosaVersion) EXPECT() *MockRosaVersionMockRecorder { } // IsLatest mocks base method. -func (m *MockRosaVersion) IsLatest(latestVersion string) (*go_version.Version, bool, error) { +func (m *MockRosaVersion) IsLatest(latestVersion string) (*version.Version, bool, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IsLatest", latestVersion) - ret0, _ := ret[0].(*go_version.Version) + ret0, _ := ret[0].(*version.Version) ret1, _ := ret[1].(bool) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } // IsLatest indicates an expected call of IsLatest. -func (mr *MockRosaVersionMockRecorder) IsLatest(latestVersion interface{}) *gomock.Call { +func (mr *MockRosaVersionMockRecorder) IsLatest(latestVersion any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsLatest", reflect.TypeOf((*MockRosaVersion)(nil).IsLatest), latestVersion) } diff --git a/vendor/github.com/golang/mock/AUTHORS b/vendor/github.com/golang/mock/AUTHORS deleted file mode 100644 index 660b8ccc8a..0000000000 --- a/vendor/github.com/golang/mock/AUTHORS +++ /dev/null @@ -1,12 +0,0 @@ -# This is the official list of GoMock authors for copyright purposes. -# This file is distinct from the CONTRIBUTORS files. -# See the latter for an explanation. - -# Names should be added to this file as -# Name or Organization -# The email address is not required for organizations. - -# Please keep the list sorted. - -Alex Reece -Google Inc. diff --git a/vendor/github.com/golang/mock/CONTRIBUTORS b/vendor/github.com/golang/mock/CONTRIBUTORS deleted file mode 100644 index def849cab1..0000000000 --- a/vendor/github.com/golang/mock/CONTRIBUTORS +++ /dev/null @@ -1,37 +0,0 @@ -# This is the official list of people who can contribute (and typically -# have contributed) code to the gomock repository. -# The AUTHORS file lists the copyright holders; this file -# lists people. For example, Google employees are listed here -# but not in AUTHORS, because Google holds the copyright. -# -# The submission process automatically checks to make sure -# that people submitting code are listed in this file (by email address). -# -# Names should be added to this file only after verifying that -# the individual or the individual's organization has agreed to -# the appropriate Contributor License Agreement, found here: -# -# http://code.google.com/legal/individual-cla-v1.0.html -# http://code.google.com/legal/corporate-cla-v1.0.html -# -# The agreement for individuals can be filled out on the web. -# -# When adding J Random Contributor's name to this file, -# either J's name or J's organization's name should be -# added to the AUTHORS file, depending on whether the -# individual or corporate CLA was used. - -# Names should be added to this file like so: -# Name -# -# An entry with two email addresses specifies that the -# first address should be used in the submit logs and -# that the second address should be recognized as the -# same person when interacting with Rietveld. - -# Please keep the list sorted. - -Aaron Jacobs -Alex Reece -David Symonds -Ryan Barrett diff --git a/vendor/github.com/golang/mock/LICENSE b/vendor/github.com/golang/mock/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/golang/mock/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/golang/mock/gomock/call.go b/vendor/github.com/golang/mock/gomock/call.go deleted file mode 100644 index 13c9f44b1e..0000000000 --- a/vendor/github.com/golang/mock/gomock/call.go +++ /dev/null @@ -1,445 +0,0 @@ -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gomock - -import ( - "fmt" - "reflect" - "strconv" - "strings" -) - -// Call represents an expected call to a mock. -type Call struct { - t TestHelper // for triggering test failures on invalid call setup - - receiver interface{} // the receiver of the method call - method string // the name of the method - methodType reflect.Type // the type of the method - args []Matcher // the args - origin string // file and line number of call setup - - preReqs []*Call // prerequisite calls - - // Expectations - minCalls, maxCalls int - - numCalls int // actual number made - - // actions are called when this Call is called. Each action gets the args and - // can set the return values by returning a non-nil slice. Actions run in the - // order they are created. - actions []func([]interface{}) []interface{} -} - -// newCall creates a *Call. It requires the method type in order to support -// unexported methods. -func newCall(t TestHelper, receiver interface{}, method string, methodType reflect.Type, args ...interface{}) *Call { - t.Helper() - - // TODO: check arity, types. - mArgs := make([]Matcher, len(args)) - for i, arg := range args { - if m, ok := arg.(Matcher); ok { - mArgs[i] = m - } else if arg == nil { - // Handle nil specially so that passing a nil interface value - // will match the typed nils of concrete args. - mArgs[i] = Nil() - } else { - mArgs[i] = Eq(arg) - } - } - - // callerInfo's skip should be updated if the number of calls between the user's test - // and this line changes, i.e. this code is wrapped in another anonymous function. - // 0 is us, 1 is RecordCallWithMethodType(), 2 is the generated recorder, and 3 is the user's test. - origin := callerInfo(3) - actions := []func([]interface{}) []interface{}{func([]interface{}) []interface{} { - // Synthesize the zero value for each of the return args' types. - rets := make([]interface{}, methodType.NumOut()) - for i := 0; i < methodType.NumOut(); i++ { - rets[i] = reflect.Zero(methodType.Out(i)).Interface() - } - return rets - }} - return &Call{t: t, receiver: receiver, method: method, methodType: methodType, - args: mArgs, origin: origin, minCalls: 1, maxCalls: 1, actions: actions} -} - -// AnyTimes allows the expectation to be called 0 or more times -func (c *Call) AnyTimes() *Call { - c.minCalls, c.maxCalls = 0, 1e8 // close enough to infinity - return c -} - -// MinTimes requires the call to occur at least n times. If AnyTimes or MaxTimes have not been called or if MaxTimes -// was previously called with 1, MinTimes also sets the maximum number of calls to infinity. -func (c *Call) MinTimes(n int) *Call { - c.minCalls = n - if c.maxCalls == 1 { - c.maxCalls = 1e8 - } - return c -} - -// MaxTimes limits the number of calls to n times. If AnyTimes or MinTimes have not been called or if MinTimes was -// previously called with 1, MaxTimes also sets the minimum number of calls to 0. -func (c *Call) MaxTimes(n int) *Call { - c.maxCalls = n - if c.minCalls == 1 { - c.minCalls = 0 - } - return c -} - -// DoAndReturn declares the action to run when the call is matched. -// The return values from this function are returned by the mocked function. -// It takes an interface{} argument to support n-arity functions. -func (c *Call) DoAndReturn(f interface{}) *Call { - // TODO: Check arity and types here, rather than dying badly elsewhere. - v := reflect.ValueOf(f) - - c.addAction(func(args []interface{}) []interface{} { - c.t.Helper() - vArgs := make([]reflect.Value, len(args)) - ft := v.Type() - if c.methodType.NumIn() != ft.NumIn() { - c.t.Fatalf("wrong number of arguments in DoAndReturn func for %T.%v: got %d, want %d [%s]", - c.receiver, c.method, ft.NumIn(), c.methodType.NumIn(), c.origin) - return nil - } - for i := 0; i < len(args); i++ { - if args[i] != nil { - vArgs[i] = reflect.ValueOf(args[i]) - } else { - // Use the zero value for the arg. - vArgs[i] = reflect.Zero(ft.In(i)) - } - } - vRets := v.Call(vArgs) - rets := make([]interface{}, len(vRets)) - for i, ret := range vRets { - rets[i] = ret.Interface() - } - return rets - }) - return c -} - -// Do declares the action to run when the call is matched. The function's -// return values are ignored to retain backward compatibility. To use the -// return values call DoAndReturn. -// It takes an interface{} argument to support n-arity functions. -func (c *Call) Do(f interface{}) *Call { - // TODO: Check arity and types here, rather than dying badly elsewhere. - v := reflect.ValueOf(f) - - c.addAction(func(args []interface{}) []interface{} { - c.t.Helper() - if c.methodType.NumIn() != v.Type().NumIn() { - c.t.Fatalf("wrong number of arguments in Do func for %T.%v: got %d, want %d [%s]", - c.receiver, c.method, v.Type().NumIn(), c.methodType.NumIn(), c.origin) - return nil - } - vArgs := make([]reflect.Value, len(args)) - ft := v.Type() - for i := 0; i < len(args); i++ { - if args[i] != nil { - vArgs[i] = reflect.ValueOf(args[i]) - } else { - // Use the zero value for the arg. - vArgs[i] = reflect.Zero(ft.In(i)) - } - } - v.Call(vArgs) - return nil - }) - return c -} - -// Return declares the values to be returned by the mocked function call. -func (c *Call) Return(rets ...interface{}) *Call { - c.t.Helper() - - mt := c.methodType - if len(rets) != mt.NumOut() { - c.t.Fatalf("wrong number of arguments to Return for %T.%v: got %d, want %d [%s]", - c.receiver, c.method, len(rets), mt.NumOut(), c.origin) - } - for i, ret := range rets { - if got, want := reflect.TypeOf(ret), mt.Out(i); got == want { - // Identical types; nothing to do. - } else if got == nil { - // Nil needs special handling. - switch want.Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - // ok - default: - c.t.Fatalf("argument %d to Return for %T.%v is nil, but %v is not nillable [%s]", - i, c.receiver, c.method, want, c.origin) - } - } else if got.AssignableTo(want) { - // Assignable type relation. Make the assignment now so that the generated code - // can return the values with a type assertion. - v := reflect.New(want).Elem() - v.Set(reflect.ValueOf(ret)) - rets[i] = v.Interface() - } else { - c.t.Fatalf("wrong type of argument %d to Return for %T.%v: %v is not assignable to %v [%s]", - i, c.receiver, c.method, got, want, c.origin) - } - } - - c.addAction(func([]interface{}) []interface{} { - return rets - }) - - return c -} - -// Times declares the exact number of times a function call is expected to be executed. -func (c *Call) Times(n int) *Call { - c.minCalls, c.maxCalls = n, n - return c -} - -// SetArg declares an action that will set the nth argument's value, -// indirected through a pointer. Or, in the case of a slice, SetArg -// will copy value's elements into the nth argument. -func (c *Call) SetArg(n int, value interface{}) *Call { - c.t.Helper() - - mt := c.methodType - // TODO: This will break on variadic methods. - // We will need to check those at invocation time. - if n < 0 || n >= mt.NumIn() { - c.t.Fatalf("SetArg(%d, ...) called for a method with %d args [%s]", - n, mt.NumIn(), c.origin) - } - // Permit setting argument through an interface. - // In the interface case, we don't (nay, can't) check the type here. - at := mt.In(n) - switch at.Kind() { - case reflect.Ptr: - dt := at.Elem() - if vt := reflect.TypeOf(value); !vt.AssignableTo(dt) { - c.t.Fatalf("SetArg(%d, ...) argument is a %v, not assignable to %v [%s]", - n, vt, dt, c.origin) - } - case reflect.Interface: - // nothing to do - case reflect.Slice: - // nothing to do - default: - c.t.Fatalf("SetArg(%d, ...) referring to argument of non-pointer non-interface non-slice type %v [%s]", - n, at, c.origin) - } - - c.addAction(func(args []interface{}) []interface{} { - v := reflect.ValueOf(value) - switch reflect.TypeOf(args[n]).Kind() { - case reflect.Slice: - setSlice(args[n], v) - default: - reflect.ValueOf(args[n]).Elem().Set(v) - } - return nil - }) - return c -} - -// isPreReq returns true if other is a direct or indirect prerequisite to c. -func (c *Call) isPreReq(other *Call) bool { - for _, preReq := range c.preReqs { - if other == preReq || preReq.isPreReq(other) { - return true - } - } - return false -} - -// After declares that the call may only match after preReq has been exhausted. -func (c *Call) After(preReq *Call) *Call { - c.t.Helper() - - if c == preReq { - c.t.Fatalf("A call isn't allowed to be its own prerequisite") - } - if preReq.isPreReq(c) { - c.t.Fatalf("Loop in call order: %v is a prerequisite to %v (possibly indirectly).", c, preReq) - } - - c.preReqs = append(c.preReqs, preReq) - return c -} - -// Returns true if the minimum number of calls have been made. -func (c *Call) satisfied() bool { - return c.numCalls >= c.minCalls -} - -// Returns true if the maximum number of calls have been made. -func (c *Call) exhausted() bool { - return c.numCalls >= c.maxCalls -} - -func (c *Call) String() string { - args := make([]string, len(c.args)) - for i, arg := range c.args { - args[i] = arg.String() - } - arguments := strings.Join(args, ", ") - return fmt.Sprintf("%T.%v(%s) %s", c.receiver, c.method, arguments, c.origin) -} - -// Tests if the given call matches the expected call. -// If yes, returns nil. If no, returns error with message explaining why it does not match. -func (c *Call) matches(args []interface{}) error { - if !c.methodType.IsVariadic() { - if len(args) != len(c.args) { - return fmt.Errorf("expected call at %s has the wrong number of arguments. Got: %d, want: %d", - c.origin, len(args), len(c.args)) - } - - for i, m := range c.args { - if !m.Matches(args[i]) { - return fmt.Errorf( - "expected call at %s doesn't match the argument at index %d.\nGot: %v\nWant: %v", - c.origin, i, formatGottenArg(m, args[i]), m, - ) - } - } - } else { - if len(c.args) < c.methodType.NumIn()-1 { - return fmt.Errorf("expected call at %s has the wrong number of matchers. Got: %d, want: %d", - c.origin, len(c.args), c.methodType.NumIn()-1) - } - if len(c.args) != c.methodType.NumIn() && len(args) != len(c.args) { - return fmt.Errorf("expected call at %s has the wrong number of arguments. Got: %d, want: %d", - c.origin, len(args), len(c.args)) - } - if len(args) < len(c.args)-1 { - return fmt.Errorf("expected call at %s has the wrong number of arguments. Got: %d, want: greater than or equal to %d", - c.origin, len(args), len(c.args)-1) - } - - for i, m := range c.args { - if i < c.methodType.NumIn()-1 { - // Non-variadic args - if !m.Matches(args[i]) { - return fmt.Errorf("expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", - c.origin, strconv.Itoa(i), formatGottenArg(m, args[i]), m) - } - continue - } - // The last arg has a possibility of a variadic argument, so let it branch - - // sample: Foo(a int, b int, c ...int) - if i < len(c.args) && i < len(args) { - if m.Matches(args[i]) { - // Got Foo(a, b, c) want Foo(matcherA, matcherB, gomock.Any()) - // Got Foo(a, b, c) want Foo(matcherA, matcherB, someSliceMatcher) - // Got Foo(a, b, c) want Foo(matcherA, matcherB, matcherC) - // Got Foo(a, b) want Foo(matcherA, matcherB) - // Got Foo(a, b, c, d) want Foo(matcherA, matcherB, matcherC, matcherD) - continue - } - } - - // The number of actual args don't match the number of matchers, - // or the last matcher is a slice and the last arg is not. - // If this function still matches it is because the last matcher - // matches all the remaining arguments or the lack of any. - // Convert the remaining arguments, if any, into a slice of the - // expected type. - vArgsType := c.methodType.In(c.methodType.NumIn() - 1) - vArgs := reflect.MakeSlice(vArgsType, 0, len(args)-i) - for _, arg := range args[i:] { - vArgs = reflect.Append(vArgs, reflect.ValueOf(arg)) - } - if m.Matches(vArgs.Interface()) { - // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, gomock.Any()) - // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, someSliceMatcher) - // Got Foo(a, b) want Foo(matcherA, matcherB, gomock.Any()) - // Got Foo(a, b) want Foo(matcherA, matcherB, someEmptySliceMatcher) - break - } - // Wrong number of matchers or not match. Fail. - // Got Foo(a, b) want Foo(matcherA, matcherB, matcherC, matcherD) - // Got Foo(a, b, c) want Foo(matcherA, matcherB, matcherC, matcherD) - // Got Foo(a, b, c, d) want Foo(matcherA, matcherB, matcherC, matcherD, matcherE) - // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, matcherC, matcherD) - // Got Foo(a, b, c) want Foo(matcherA, matcherB) - - return fmt.Errorf("expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", - c.origin, strconv.Itoa(i), formatGottenArg(m, args[i:]), c.args[i]) - } - } - - // Check that all prerequisite calls have been satisfied. - for _, preReqCall := range c.preReqs { - if !preReqCall.satisfied() { - return fmt.Errorf("expected call at %s doesn't have a prerequisite call satisfied:\n%v\nshould be called before:\n%v", - c.origin, preReqCall, c) - } - } - - // Check that the call is not exhausted. - if c.exhausted() { - return fmt.Errorf("expected call at %s has already been called the max number of times", c.origin) - } - - return nil -} - -// dropPrereqs tells the expected Call to not re-check prerequisite calls any -// longer, and to return its current set. -func (c *Call) dropPrereqs() (preReqs []*Call) { - preReqs = c.preReqs - c.preReqs = nil - return -} - -func (c *Call) call() []func([]interface{}) []interface{} { - c.numCalls++ - return c.actions -} - -// InOrder declares that the given calls should occur in order. -func InOrder(calls ...*Call) { - for i := 1; i < len(calls); i++ { - calls[i].After(calls[i-1]) - } -} - -func setSlice(arg interface{}, v reflect.Value) { - va := reflect.ValueOf(arg) - for i := 0; i < v.Len(); i++ { - va.Index(i).Set(v.Index(i)) - } -} - -func (c *Call) addAction(action func([]interface{}) []interface{}) { - c.actions = append(c.actions, action) -} - -func formatGottenArg(m Matcher, arg interface{}) string { - got := fmt.Sprintf("%v (%T)", arg, arg) - if gs, ok := m.(GotFormatter); ok { - got = gs.Got(arg) - } - return got -} diff --git a/vendor/github.com/golang/mock/gomock/callset.go b/vendor/github.com/golang/mock/gomock/callset.go deleted file mode 100644 index 49dba787a4..0000000000 --- a/vendor/github.com/golang/mock/gomock/callset.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2011 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gomock - -import ( - "bytes" - "errors" - "fmt" -) - -// callSet represents a set of expected calls, indexed by receiver and method -// name. -type callSet struct { - // Calls that are still expected. - expected map[callSetKey][]*Call - // Calls that have been exhausted. - exhausted map[callSetKey][]*Call -} - -// callSetKey is the key in the maps in callSet -type callSetKey struct { - receiver interface{} - fname string -} - -func newCallSet() *callSet { - return &callSet{make(map[callSetKey][]*Call), make(map[callSetKey][]*Call)} -} - -// Add adds a new expected call. -func (cs callSet) Add(call *Call) { - key := callSetKey{call.receiver, call.method} - m := cs.expected - if call.exhausted() { - m = cs.exhausted - } - m[key] = append(m[key], call) -} - -// Remove removes an expected call. -func (cs callSet) Remove(call *Call) { - key := callSetKey{call.receiver, call.method} - calls := cs.expected[key] - for i, c := range calls { - if c == call { - // maintain order for remaining calls - cs.expected[key] = append(calls[:i], calls[i+1:]...) - cs.exhausted[key] = append(cs.exhausted[key], call) - break - } - } -} - -// FindMatch searches for a matching call. Returns error with explanation message if no call matched. -func (cs callSet) FindMatch(receiver interface{}, method string, args []interface{}) (*Call, error) { - key := callSetKey{receiver, method} - - // Search through the expected calls. - expected := cs.expected[key] - var callsErrors bytes.Buffer - for _, call := range expected { - err := call.matches(args) - if err != nil { - _, _ = fmt.Fprintf(&callsErrors, "\n%v", err) - } else { - return call, nil - } - } - - // If we haven't found a match then search through the exhausted calls so we - // get useful error messages. - exhausted := cs.exhausted[key] - for _, call := range exhausted { - if err := call.matches(args); err != nil { - _, _ = fmt.Fprintf(&callsErrors, "\n%v", err) - continue - } - _, _ = fmt.Fprintf( - &callsErrors, "all expected calls for method %q have been exhausted", method, - ) - } - - if len(expected)+len(exhausted) == 0 { - _, _ = fmt.Fprintf(&callsErrors, "there are no expected calls of the method %q for that receiver", method) - } - - return nil, errors.New(callsErrors.String()) -} - -// Failures returns the calls that are not satisfied. -func (cs callSet) Failures() []*Call { - failures := make([]*Call, 0, len(cs.expected)) - for _, calls := range cs.expected { - for _, call := range calls { - if !call.satisfied() { - failures = append(failures, call) - } - } - } - return failures -} diff --git a/vendor/github.com/golang/mock/gomock/controller.go b/vendor/github.com/golang/mock/gomock/controller.go deleted file mode 100644 index f054200d56..0000000000 --- a/vendor/github.com/golang/mock/gomock/controller.go +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package gomock is a mock framework for Go. -// -// Standard usage: -// (1) Define an interface that you wish to mock. -// type MyInterface interface { -// SomeMethod(x int64, y string) -// } -// (2) Use mockgen to generate a mock from the interface. -// (3) Use the mock in a test: -// func TestMyThing(t *testing.T) { -// mockCtrl := gomock.NewController(t) -// defer mockCtrl.Finish() -// -// mockObj := something.NewMockMyInterface(mockCtrl) -// mockObj.EXPECT().SomeMethod(4, "blah") -// // pass mockObj to a real object and play with it. -// } -// -// By default, expected calls are not enforced to run in any particular order. -// Call order dependency can be enforced by use of InOrder and/or Call.After. -// Call.After can create more varied call order dependencies, but InOrder is -// often more convenient. -// -// The following examples create equivalent call order dependencies. -// -// Example of using Call.After to chain expected call order: -// -// firstCall := mockObj.EXPECT().SomeMethod(1, "first") -// secondCall := mockObj.EXPECT().SomeMethod(2, "second").After(firstCall) -// mockObj.EXPECT().SomeMethod(3, "third").After(secondCall) -// -// Example of using InOrder to declare expected call order: -// -// gomock.InOrder( -// mockObj.EXPECT().SomeMethod(1, "first"), -// mockObj.EXPECT().SomeMethod(2, "second"), -// mockObj.EXPECT().SomeMethod(3, "third"), -// ) -package gomock - -import ( - "context" - "fmt" - "reflect" - "runtime" - "sync" -) - -// A TestReporter is something that can be used to report test failures. It -// is satisfied by the standard library's *testing.T. -type TestReporter interface { - Errorf(format string, args ...interface{}) - Fatalf(format string, args ...interface{}) -} - -// TestHelper is a TestReporter that has the Helper method. It is satisfied -// by the standard library's *testing.T. -type TestHelper interface { - TestReporter - Helper() -} - -// cleanuper is used to check if TestHelper also has the `Cleanup` method. A -// common pattern is to pass in a `*testing.T` to -// `NewController(t TestReporter)`. In Go 1.14+, `*testing.T` has a cleanup -// method. This can be utilized to call `Finish()` so the caller of this library -// does not have to. -type cleanuper interface { - Cleanup(func()) -} - -// A Controller represents the top-level control of a mock ecosystem. It -// defines the scope and lifetime of mock objects, as well as their -// expectations. It is safe to call Controller's methods from multiple -// goroutines. Each test should create a new Controller and invoke Finish via -// defer. -// -// func TestFoo(t *testing.T) { -// ctrl := gomock.NewController(t) -// defer ctrl.Finish() -// // .. -// } -// -// func TestBar(t *testing.T) { -// t.Run("Sub-Test-1", st) { -// ctrl := gomock.NewController(st) -// defer ctrl.Finish() -// // .. -// }) -// t.Run("Sub-Test-2", st) { -// ctrl := gomock.NewController(st) -// defer ctrl.Finish() -// // .. -// }) -// }) -type Controller struct { - // T should only be called within a generated mock. It is not intended to - // be used in user code and may be changed in future versions. T is the - // TestReporter passed in when creating the Controller via NewController. - // If the TestReporter does not implement a TestHelper it will be wrapped - // with a nopTestHelper. - T TestHelper - mu sync.Mutex - expectedCalls *callSet - finished bool -} - -// NewController returns a new Controller. It is the preferred way to create a -// Controller. -// -// New in go1.14+, if you are passing a *testing.T into this function you no -// longer need to call ctrl.Finish() in your test methods. -func NewController(t TestReporter) *Controller { - h, ok := t.(TestHelper) - if !ok { - h = &nopTestHelper{t} - } - ctrl := &Controller{ - T: h, - expectedCalls: newCallSet(), - } - if c, ok := isCleanuper(ctrl.T); ok { - c.Cleanup(func() { - ctrl.T.Helper() - ctrl.finish(true, nil) - }) - } - - return ctrl -} - -type cancelReporter struct { - t TestHelper - cancel func() -} - -func (r *cancelReporter) Errorf(format string, args ...interface{}) { - r.t.Errorf(format, args...) -} -func (r *cancelReporter) Fatalf(format string, args ...interface{}) { - defer r.cancel() - r.t.Fatalf(format, args...) -} - -func (r *cancelReporter) Helper() { - r.t.Helper() -} - -// WithContext returns a new Controller and a Context, which is cancelled on any -// fatal failure. -func WithContext(ctx context.Context, t TestReporter) (*Controller, context.Context) { - h, ok := t.(TestHelper) - if !ok { - h = &nopTestHelper{t: t} - } - - ctx, cancel := context.WithCancel(ctx) - return NewController(&cancelReporter{t: h, cancel: cancel}), ctx -} - -type nopTestHelper struct { - t TestReporter -} - -func (h *nopTestHelper) Errorf(format string, args ...interface{}) { - h.t.Errorf(format, args...) -} -func (h *nopTestHelper) Fatalf(format string, args ...interface{}) { - h.t.Fatalf(format, args...) -} - -func (h nopTestHelper) Helper() {} - -// RecordCall is called by a mock. It should not be called by user code. -func (ctrl *Controller) RecordCall(receiver interface{}, method string, args ...interface{}) *Call { - ctrl.T.Helper() - - recv := reflect.ValueOf(receiver) - for i := 0; i < recv.Type().NumMethod(); i++ { - if recv.Type().Method(i).Name == method { - return ctrl.RecordCallWithMethodType(receiver, method, recv.Method(i).Type(), args...) - } - } - ctrl.T.Fatalf("gomock: failed finding method %s on %T", method, receiver) - panic("unreachable") -} - -// RecordCallWithMethodType is called by a mock. It should not be called by user code. -func (ctrl *Controller) RecordCallWithMethodType(receiver interface{}, method string, methodType reflect.Type, args ...interface{}) *Call { - ctrl.T.Helper() - - call := newCall(ctrl.T, receiver, method, methodType, args...) - - ctrl.mu.Lock() - defer ctrl.mu.Unlock() - ctrl.expectedCalls.Add(call) - - return call -} - -// Call is called by a mock. It should not be called by user code. -func (ctrl *Controller) Call(receiver interface{}, method string, args ...interface{}) []interface{} { - ctrl.T.Helper() - - // Nest this code so we can use defer to make sure the lock is released. - actions := func() []func([]interface{}) []interface{} { - ctrl.T.Helper() - ctrl.mu.Lock() - defer ctrl.mu.Unlock() - - expected, err := ctrl.expectedCalls.FindMatch(receiver, method, args) - if err != nil { - // callerInfo's skip should be updated if the number of calls between the user's test - // and this line changes, i.e. this code is wrapped in another anonymous function. - // 0 is us, 1 is controller.Call(), 2 is the generated mock, and 3 is the user's test. - origin := callerInfo(3) - ctrl.T.Fatalf("Unexpected call to %T.%v(%v) at %s because: %s", receiver, method, args, origin, err) - } - - // Two things happen here: - // * the matching call no longer needs to check prerequite calls, - // * and the prerequite calls are no longer expected, so remove them. - preReqCalls := expected.dropPrereqs() - for _, preReqCall := range preReqCalls { - ctrl.expectedCalls.Remove(preReqCall) - } - - actions := expected.call() - if expected.exhausted() { - ctrl.expectedCalls.Remove(expected) - } - return actions - }() - - var rets []interface{} - for _, action := range actions { - if r := action(args); r != nil { - rets = r - } - } - - return rets -} - -// Finish checks to see if all the methods that were expected to be called -// were called. It should be invoked for each Controller. It is not idempotent -// and therefore can only be invoked once. -// -// New in go1.14+, if you are passing a *testing.T into NewController function you no -// longer need to call ctrl.Finish() in your test methods. -func (ctrl *Controller) Finish() { - // If we're currently panicking, probably because this is a deferred call. - // This must be recovered in the deferred function. - err := recover() - ctrl.finish(false, err) -} - -func (ctrl *Controller) finish(cleanup bool, panicErr interface{}) { - ctrl.T.Helper() - - ctrl.mu.Lock() - defer ctrl.mu.Unlock() - - if ctrl.finished { - if _, ok := isCleanuper(ctrl.T); !ok { - ctrl.T.Fatalf("Controller.Finish was called more than once. It has to be called exactly once.") - } - return - } - ctrl.finished = true - - // Short-circuit, pass through the panic. - if panicErr != nil { - panic(panicErr) - } - - // Check that all remaining expected calls are satisfied. - failures := ctrl.expectedCalls.Failures() - for _, call := range failures { - ctrl.T.Errorf("missing call(s) to %v", call) - } - if len(failures) != 0 { - if !cleanup { - ctrl.T.Fatalf("aborting test due to missing call(s)") - return - } - ctrl.T.Errorf("aborting test due to missing call(s)") - } -} - -// callerInfo returns the file:line of the call site. skip is the number -// of stack frames to skip when reporting. 0 is callerInfo's call site. -func callerInfo(skip int) string { - if _, file, line, ok := runtime.Caller(skip + 1); ok { - return fmt.Sprintf("%s:%d", file, line) - } - return "unknown file" -} - -// isCleanuper checks it if t's base TestReporter has a Cleanup method. -func isCleanuper(t TestReporter) (cleanuper, bool) { - tr := unwrapTestReporter(t) - c, ok := tr.(cleanuper) - return c, ok -} - -// unwrapTestReporter unwraps TestReporter to the base implementation. -func unwrapTestReporter(t TestReporter) TestReporter { - tr := t - switch nt := t.(type) { - case *cancelReporter: - tr = nt.t - if h, check := tr.(*nopTestHelper); check { - tr = h.t - } - case *nopTestHelper: - tr = nt.t - default: - // not wrapped - } - return tr -} diff --git a/vendor/github.com/golang/mock/gomock/matchers.go b/vendor/github.com/golang/mock/gomock/matchers.go deleted file mode 100644 index 2822fb2c8c..0000000000 --- a/vendor/github.com/golang/mock/gomock/matchers.go +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package gomock - -import ( - "fmt" - "reflect" - "strings" -) - -// A Matcher is a representation of a class of values. -// It is used to represent the valid or expected arguments to a mocked method. -type Matcher interface { - // Matches returns whether x is a match. - Matches(x interface{}) bool - - // String describes what the matcher matches. - String() string -} - -// WantFormatter modifies the given Matcher's String() method to the given -// Stringer. This allows for control on how the "Want" is formatted when -// printing . -func WantFormatter(s fmt.Stringer, m Matcher) Matcher { - type matcher interface { - Matches(x interface{}) bool - } - - return struct { - matcher - fmt.Stringer - }{ - matcher: m, - Stringer: s, - } -} - -// StringerFunc type is an adapter to allow the use of ordinary functions as -// a Stringer. If f is a function with the appropriate signature, -// StringerFunc(f) is a Stringer that calls f. -type StringerFunc func() string - -// String implements fmt.Stringer. -func (f StringerFunc) String() string { - return f() -} - -// GotFormatter is used to better print failure messages. If a matcher -// implements GotFormatter, it will use the result from Got when printing -// the failure message. -type GotFormatter interface { - // Got is invoked with the received value. The result is used when - // printing the failure message. - Got(got interface{}) string -} - -// GotFormatterFunc type is an adapter to allow the use of ordinary -// functions as a GotFormatter. If f is a function with the appropriate -// signature, GotFormatterFunc(f) is a GotFormatter that calls f. -type GotFormatterFunc func(got interface{}) string - -// Got implements GotFormatter. -func (f GotFormatterFunc) Got(got interface{}) string { - return f(got) -} - -// GotFormatterAdapter attaches a GotFormatter to a Matcher. -func GotFormatterAdapter(s GotFormatter, m Matcher) Matcher { - return struct { - GotFormatter - Matcher - }{ - GotFormatter: s, - Matcher: m, - } -} - -type anyMatcher struct{} - -func (anyMatcher) Matches(interface{}) bool { - return true -} - -func (anyMatcher) String() string { - return "is anything" -} - -type eqMatcher struct { - x interface{} -} - -func (e eqMatcher) Matches(x interface{}) bool { - // In case, some value is nil - if e.x == nil || x == nil { - return reflect.DeepEqual(e.x, x) - } - - // Check if types assignable and convert them to common type - x1Val := reflect.ValueOf(e.x) - x2Val := reflect.ValueOf(x) - - if x1Val.Type().AssignableTo(x2Val.Type()) { - x1ValConverted := x1Val.Convert(x2Val.Type()) - return reflect.DeepEqual(x1ValConverted.Interface(), x2Val.Interface()) - } - - return false -} - -func (e eqMatcher) String() string { - return fmt.Sprintf("is equal to %v (%T)", e.x, e.x) -} - -type nilMatcher struct{} - -func (nilMatcher) Matches(x interface{}) bool { - if x == nil { - return true - } - - v := reflect.ValueOf(x) - switch v.Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, - reflect.Ptr, reflect.Slice: - return v.IsNil() - } - - return false -} - -func (nilMatcher) String() string { - return "is nil" -} - -type notMatcher struct { - m Matcher -} - -func (n notMatcher) Matches(x interface{}) bool { - return !n.m.Matches(x) -} - -func (n notMatcher) String() string { - return "not(" + n.m.String() + ")" -} - -type assignableToTypeOfMatcher struct { - targetType reflect.Type -} - -func (m assignableToTypeOfMatcher) Matches(x interface{}) bool { - return reflect.TypeOf(x).AssignableTo(m.targetType) -} - -func (m assignableToTypeOfMatcher) String() string { - return "is assignable to " + m.targetType.Name() -} - -type allMatcher struct { - matchers []Matcher -} - -func (am allMatcher) Matches(x interface{}) bool { - for _, m := range am.matchers { - if !m.Matches(x) { - return false - } - } - return true -} - -func (am allMatcher) String() string { - ss := make([]string, 0, len(am.matchers)) - for _, matcher := range am.matchers { - ss = append(ss, matcher.String()) - } - return strings.Join(ss, "; ") -} - -type lenMatcher struct { - i int -} - -func (m lenMatcher) Matches(x interface{}) bool { - v := reflect.ValueOf(x) - switch v.Kind() { - case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == m.i - default: - return false - } -} - -func (m lenMatcher) String() string { - return fmt.Sprintf("has length %d", m.i) -} - -type inAnyOrderMatcher struct { - x interface{} -} - -func (m inAnyOrderMatcher) Matches(x interface{}) bool { - given, ok := m.prepareValue(x) - if !ok { - return false - } - wanted, ok := m.prepareValue(m.x) - if !ok { - return false - } - - if given.Len() != wanted.Len() { - return false - } - - usedFromGiven := make([]bool, given.Len()) - foundFromWanted := make([]bool, wanted.Len()) - for i := 0; i < wanted.Len(); i++ { - wantedMatcher := Eq(wanted.Index(i).Interface()) - for j := 0; j < given.Len(); j++ { - if usedFromGiven[j] { - continue - } - if wantedMatcher.Matches(given.Index(j).Interface()) { - foundFromWanted[i] = true - usedFromGiven[j] = true - break - } - } - } - - missingFromWanted := 0 - for _, found := range foundFromWanted { - if !found { - missingFromWanted++ - } - } - extraInGiven := 0 - for _, used := range usedFromGiven { - if !used { - extraInGiven++ - } - } - - return extraInGiven == 0 && missingFromWanted == 0 -} - -func (m inAnyOrderMatcher) prepareValue(x interface{}) (reflect.Value, bool) { - xValue := reflect.ValueOf(x) - switch xValue.Kind() { - case reflect.Slice, reflect.Array: - return xValue, true - default: - return reflect.Value{}, false - } -} - -func (m inAnyOrderMatcher) String() string { - return fmt.Sprintf("has the same elements as %v", m.x) -} - -// Constructors - -// All returns a composite Matcher that returns true if and only all of the -// matchers return true. -func All(ms ...Matcher) Matcher { return allMatcher{ms} } - -// Any returns a matcher that always matches. -func Any() Matcher { return anyMatcher{} } - -// Eq returns a matcher that matches on equality. -// -// Example usage: -// Eq(5).Matches(5) // returns true -// Eq(5).Matches(4) // returns false -func Eq(x interface{}) Matcher { return eqMatcher{x} } - -// Len returns a matcher that matches on length. This matcher returns false if -// is compared to a type that is not an array, chan, map, slice, or string. -func Len(i int) Matcher { - return lenMatcher{i} -} - -// Nil returns a matcher that matches if the received value is nil. -// -// Example usage: -// var x *bytes.Buffer -// Nil().Matches(x) // returns true -// x = &bytes.Buffer{} -// Nil().Matches(x) // returns false -func Nil() Matcher { return nilMatcher{} } - -// Not reverses the results of its given child matcher. -// -// Example usage: -// Not(Eq(5)).Matches(4) // returns true -// Not(Eq(5)).Matches(5) // returns false -func Not(x interface{}) Matcher { - if m, ok := x.(Matcher); ok { - return notMatcher{m} - } - return notMatcher{Eq(x)} -} - -// AssignableToTypeOf is a Matcher that matches if the parameter to the mock -// function is assignable to the type of the parameter to this function. -// -// Example usage: -// var s fmt.Stringer = &bytes.Buffer{} -// AssignableToTypeOf(s).Matches(time.Second) // returns true -// AssignableToTypeOf(s).Matches(99) // returns false -// -// var ctx = reflect.TypeOf((*context.Context)(nil)).Elem() -// AssignableToTypeOf(ctx).Matches(context.Background()) // returns true -func AssignableToTypeOf(x interface{}) Matcher { - if xt, ok := x.(reflect.Type); ok { - return assignableToTypeOfMatcher{xt} - } - return assignableToTypeOfMatcher{reflect.TypeOf(x)} -} - -// InAnyOrder is a Matcher that returns true for collections of the same elements ignoring the order. -// -// Example usage: -// InAnyOrder([]int{1, 2, 3}).Matches([]int{1, 3, 2}) // returns true -// InAnyOrder([]int{1, 2, 3}).Matches([]int{1, 2}) // returns false -func InAnyOrder(x interface{}) Matcher { - return inAnyOrderMatcher{x} -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 6955e8d673..3f45070ccb 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -270,9 +270,6 @@ github.com/golang-jwt/jwt/v4 # github.com/golang/glog v1.2.0 => github.com/kubermatic/glog-logrus v0.0.0-20180829085450-3fa5b9870d1d ## explicit github.com/golang/glog -# github.com/golang/mock v1.6.0 -## explicit; go 1.11 -github.com/golang/mock/gomock # github.com/golang/protobuf v1.5.3 ## explicit; go 1.9 github.com/golang/protobuf/proto