diff --git a/api/v1beta1/common.go b/api/v1beta1/common.go index 418ab445..01fe2d64 100644 --- a/api/v1beta1/common.go +++ b/api/v1beta1/common.go @@ -34,7 +34,6 @@ const ( ORDERER Component = "ORDERER" PEER Component = "PEER" GRPCPROXY Component = "GRPCPROXY" - DIND Component = "DIND" COUCHDB Component = "COUCHDB" CCLAUNCHER Component = "CCLAUNCHER" ENROLLER Component = "ENROLLER" diff --git a/api/v1beta1/ibppeer.go b/api/v1beta1/ibppeer.go index c3fbb700..f229502b 100644 --- a/api/v1beta1/ibppeer.go +++ b/api/v1beta1/ibppeer.go @@ -211,10 +211,6 @@ func (s *IBPPeer) GetResource(comp Component) corev1.ResourceRequirements { if s.Spec.Resources.GRPCProxy != nil { return *s.Spec.Resources.GRPCProxy } - case DIND: - if s.Spec.Resources.DinD != nil { - return *s.Spec.Resources.DinD - } case COUCHDB: if s.Spec.Resources.CouchDB != nil { return *s.Spec.Resources.CouchDB @@ -307,7 +303,6 @@ func (i *PeerImages) Override(requested *PeerImages, registryURL string, arch st i.PeerInitImage = image.GetImage(registryURL, i.PeerInitImage, requested.PeerInitImage) i.PeerImage = image.GetImage(registryURL, i.PeerImage, requested.PeerImage) i.CouchDBImage = image.GetImage(registryURL, i.CouchDBImage, requested.CouchDBImage) - i.DindImage = image.GetImage(registryURL, i.DindImage, requested.DindImage) i.GRPCWebImage = image.GetImage(registryURL, i.GRPCWebImage, requested.GRPCWebImage) i.CCLauncherImage = image.GetImage(registryURL, i.CCLauncherImage, requested.CCLauncherImage) i.FileTransferImage = image.GetImage(registryURL, i.FileTransferImage, requested.FileTransferImage) @@ -322,7 +317,6 @@ func (i *PeerImages) Override(requested *PeerImages, registryURL string, arch st i.PeerInitTag = image.GetTag(arch, i.PeerInitTag, requested.PeerInitTag) i.PeerTag = image.GetTag(arch, i.PeerTag, requested.PeerTag) i.CouchDBTag = image.GetTag(arch, i.CouchDBTag, requested.CouchDBTag) - i.DindTag = image.GetTag(arch, i.DindTag, requested.DindTag) i.GRPCWebTag = image.GetTag(arch, i.GRPCWebTag, requested.GRPCWebTag) i.CCLauncherTag = image.GetTag(arch, i.CCLauncherTag, requested.CCLauncherTag) i.FileTransferTag = image.GetTag(arch, i.FileTransferTag, requested.FileTransferTag) diff --git a/api/v1beta1/ibppeer_types.go b/api/v1beta1/ibppeer_types.go index 3c09dc5e..c5254f58 100644 --- a/api/v1beta1/ibppeer_types.go +++ b/api/v1beta1/ibppeer_types.go @@ -136,11 +136,6 @@ type IBPPeerSpec struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Zone string `json:"zone,omitempty"` - /* advanced configs */ - // DindArgs (Optional) is used to override args passed to dind container - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true - DindArgs []string `json:"dindArgs,omitempty"` - // Action (Optional) is object for peer actions // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true Action PeerAction `json:"action,omitempty"` @@ -221,10 +216,6 @@ type PeerResources struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true GRPCProxy *corev1.ResourceRequirements `json:"proxy,omitempty"` - // DinD (Optional) is the resources provided to the dind container - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true - DinD *corev1.ResourceRequirements `json:"dind,omitempty"` - // CouchDB (Optional) is the resources provided to the couchdb container // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true CouchDB *corev1.ResourceRequirements `json:"couchdb,omitempty"` @@ -274,14 +265,6 @@ type PeerImages struct { // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true PeerTag string `json:"peerTag,omitempty"` - // DindImage is the name of the dind image - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true - DindImage string `json:"dindImage,omitempty"` - - // DindTag is the tag of the dind image - // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true - DindTag string `json:"dindTag,omitempty"` - // GRPCWebImage is the name of the grpc web proxy image // +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true GRPCWebImage string `json:"grpcwebImage,omitempty"` diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index 70f9611c..e481df13 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -1251,11 +1251,6 @@ func (in *IBPPeerSpec) DeepCopyInto(out *IBPPeerSpec) { *out = make([]string, len(*in)) copy(*out, *in) } - if in.DindArgs != nil { - in, out := &in.DindArgs, &out.DindArgs - *out = make([]string, len(*in)) - copy(*out, *in) - } out.Action = in.Action if in.ChaincodeBuilderConfig != nil { in, out := &in.ChaincodeBuilderConfig, &out.ChaincodeBuilderConfig @@ -1743,11 +1738,6 @@ func (in *PeerResources) DeepCopyInto(out *PeerResources) { *out = new(v1.ResourceRequirements) (*in).DeepCopyInto(*out) } - if in.DinD != nil { - in, out := &in.DinD, &out.DinD - *out = new(v1.ResourceRequirements) - (*in).DeepCopyInto(*out) - } if in.CouchDB != nil { in, out := &in.CouchDB, &out.CouchDB *out = new(v1.ResourceRequirements) diff --git a/bundle/manifests/fabric-opensource-operator.clusterserviceversion.yaml b/bundle/manifests/fabric-opensource-operator.clusterserviceversion.yaml index 1df370ca..67cc6122 100644 --- a/bundle/manifests/fabric-opensource-operator.clusterserviceversion.yaml +++ b/bundle/manifests/fabric-opensource-operator.clusterserviceversion.yaml @@ -613,12 +613,6 @@ spec: - description: CouchDBTag is the tag of the couchdb image displayName: Couch DBTag path: versions.peer.image.couchdbTag - - description: DindImage is the name of the dind image - displayName: Dind Image - path: versions.peer.image.dindImage - - description: DindTag is the tag of the dind image - displayName: Dind Tag - path: versions.peer.image.dindTag - description: EnrollerImage is the name of the init image for crypto generation displayName: Enroller Image path: versions.peer.image.enrollerImage @@ -1305,10 +1299,6 @@ spec: - description: StateDB is the pvc to be used as statedb's storage displayName: State DB path: customNames.pvc.statedb - - description: advanced configs DindArgs (Optional) is used to override args - passed to dind container - displayName: Dind Args - path: dindArgs - description: DisableNodeOU (Optional) is used to switch nodeou on and off displayName: Disable Node OU path: disablenodeou @@ -1347,12 +1337,6 @@ spec: - description: CouchDBTag is the tag of the couchdb image displayName: Couch DBTag path: images.couchdbTag - - description: DindImage is the name of the dind image - displayName: Dind Image - path: images.dindImage - - description: DindTag is the tag of the dind image - displayName: Dind Tag - path: images.dindTag - description: EnrollerImage is the name of the init image for crypto generation displayName: Enroller Image path: images.enrollerImage @@ -1470,11 +1454,6 @@ spec: path: resources.couchdb x-descriptors: - urn:alm:descriptor:com.tectonic.ui:resourceRequirements - - description: DinD (Optional) is the resources provided to the dind container - displayName: Din D - path: resources.dind - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:resourceRequirements - description: Enroller (Optional) is the resources provided to the enroller container displayName: Enroller diff --git a/bundle/manifests/ibp.com_ibpconsoles.yaml b/bundle/manifests/ibp.com_ibpconsoles.yaml index 692f3616..554c5d47 100644 --- a/bundle/manifests/ibp.com_ibpconsoles.yaml +++ b/bundle/manifests/ibp.com_ibpconsoles.yaml @@ -635,12 +635,6 @@ spec: couchdbTag: description: CouchDBTag is the tag of the couchdb image type: string - dindImage: - description: DindImage is the name of the dind image - type: string - dindTag: - description: DindTag is the tag of the dind image - type: string enrollerImage: description: EnrollerImage is the name of the init image for crypto generation diff --git a/bundle/manifests/ibp.com_ibppeers.yaml b/bundle/manifests/ibp.com_ibppeers.yaml index 652851a0..1b0d7a9f 100644 --- a/bundle/manifests/ibp.com_ibppeers.yaml +++ b/bundle/manifests/ibp.com_ibppeers.yaml @@ -111,12 +111,6 @@ spec: type: string type: object type: object - dindArgs: - description: advanced configs DindArgs (Optional) is used to override - args passed to dind container - items: - type: string - type: array disablenodeou: description: DisableNodeOU (Optional) is used to switch nodeou on and off @@ -162,12 +156,6 @@ spec: couchdbTag: description: CouchDBTag is the tag of the couchdb image type: string - dindImage: - description: DindImage is the name of the dind image - type: string - dindTag: - description: DindTag is the tag of the dind image - type: string enrollerImage: description: EnrollerImage is the name of the init image for crypto generation @@ -333,33 +321,6 @@ spec: to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object - dind: - description: DinD (Optional) is the resources provided to the - dind container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object enroller: description: Enroller (Optional) is the resources provided to the enroller container diff --git a/config/crd/bases/ibp.com_ibpconsoles.yaml b/config/crd/bases/ibp.com_ibpconsoles.yaml index ef67bb30..2a33f2c0 100644 --- a/config/crd/bases/ibp.com_ibpconsoles.yaml +++ b/config/crd/bases/ibp.com_ibpconsoles.yaml @@ -636,12 +636,6 @@ spec: couchdbTag: description: CouchDBTag is the tag of the couchdb image type: string - dindImage: - description: DindImage is the name of the dind image - type: string - dindTag: - description: DindTag is the tag of the dind image - type: string enrollerImage: description: EnrollerImage is the name of the init image for crypto generation diff --git a/config/crd/bases/ibp.com_ibppeers.yaml b/config/crd/bases/ibp.com_ibppeers.yaml index fe9639a2..6e2305dd 100644 --- a/config/crd/bases/ibp.com_ibppeers.yaml +++ b/config/crd/bases/ibp.com_ibppeers.yaml @@ -112,12 +112,6 @@ spec: type: string type: object type: object - dindArgs: - description: advanced configs DindArgs (Optional) is used to override - args passed to dind container - items: - type: string - type: array disablenodeou: description: DisableNodeOU (Optional) is used to switch nodeou on and off @@ -163,12 +157,6 @@ spec: couchdbTag: description: CouchDBTag is the tag of the couchdb image type: string - dindImage: - description: DindImage is the name of the dind image - type: string - dindTag: - description: DindTag is the tag of the dind image - type: string enrollerImage: description: EnrollerImage is the name of the init image for crypto generation @@ -334,33 +322,6 @@ spec: to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' type: object type: object - dind: - description: DinD (Optional) is the resources provided to the - dind container - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of compute - resources required. If Requests is omitted for a container, - it defaults to Limits if that is explicitly specified, otherwise - to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object enroller: description: Enroller (Optional) is the resources provided to the enroller container diff --git a/config/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml b/config/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml index 35b7f2a2..966f2946 100644 --- a/config/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml @@ -613,12 +613,6 @@ spec: - description: CouchDBTag is the tag of the couchdb image displayName: Couch DBTag path: versions.peer.image.couchdbTag - - description: DindImage is the name of the dind image - displayName: Dind Image - path: versions.peer.image.dindImage - - description: DindTag is the tag of the dind image - displayName: Dind Tag - path: versions.peer.image.dindTag - description: EnrollerImage is the name of the init image for crypto generation displayName: Enroller Image path: versions.peer.image.enrollerImage @@ -1305,10 +1299,6 @@ spec: - description: StateDB is the pvc to be used as statedb's storage displayName: State DB path: customNames.pvc.statedb - - description: advanced configs DindArgs (Optional) is used to override args - passed to dind container - displayName: Dind Args - path: dindArgs - description: DisableNodeOU (Optional) is used to switch nodeou on and off displayName: Disable Node OU path: disablenodeou @@ -1347,12 +1337,6 @@ spec: - description: CouchDBTag is the tag of the couchdb image displayName: Couch DBTag path: images.couchdbTag - - description: DindImage is the name of the dind image - displayName: Dind Image - path: images.dindImage - - description: DindTag is the tag of the dind image - displayName: Dind Tag - path: images.dindTag - description: EnrollerImage is the name of the init image for crypto generation displayName: Enroller Image path: images.enrollerImage @@ -1470,11 +1454,6 @@ spec: path: resources.couchdb x-descriptors: - urn:alm:descriptor:com.tectonic.ui:resourceRequirements - - description: DinD (Optional) is the resources provided to the dind container - displayName: Din D - path: resources.dind - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:resourceRequirements - description: Enroller (Optional) is the resources provided to the enroller container displayName: Enroller diff --git a/controllers/ibpca/mocks/careconcile.go b/controllers/ibpca/mocks/careconcile.go index dfc2e9e5..acc32377 100644 --- a/controllers/ibpca/mocks/careconcile.go +++ b/controllers/ibpca/mocks/careconcile.go @@ -35,16 +35,15 @@ func (fake *CAReconcile) Reconcile(arg1 *v1beta1.IBPCA, arg2 baseca.Update) (com arg1 *v1beta1.IBPCA arg2 baseca.Update }{arg1, arg2}) - stub := fake.ReconcileStub - fakeReturns := fake.reconcileReturns fake.recordInvocation("Reconcile", []interface{}{arg1, arg2}) fake.reconcileMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ReconcileStub != nil { + return fake.ReconcileStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.reconcileReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/controllers/ibpconsole/mocks/consolereconcile.go b/controllers/ibpconsole/mocks/consolereconcile.go index 050a92fa..4bd4bb2f 100644 --- a/controllers/ibpconsole/mocks/consolereconcile.go +++ b/controllers/ibpconsole/mocks/consolereconcile.go @@ -35,16 +35,15 @@ func (fake *ConsoleReconcile) Reconcile(arg1 *v1beta1.IBPConsole, arg2 baseconso arg1 *v1beta1.IBPConsole arg2 baseconsole.Update }{arg1, arg2}) - stub := fake.ReconcileStub - fakeReturns := fake.reconcileReturns fake.recordInvocation("Reconcile", []interface{}{arg1, arg2}) fake.reconcileMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ReconcileStub != nil { + return fake.ReconcileStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.reconcileReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/controllers/ibporderer/mocks/ordererreconcile.go b/controllers/ibporderer/mocks/ordererreconcile.go index 9f06ac90..43f5677e 100644 --- a/controllers/ibporderer/mocks/ordererreconcile.go +++ b/controllers/ibporderer/mocks/ordererreconcile.go @@ -35,16 +35,15 @@ func (fake *OrdererReconcile) Reconcile(arg1 *v1beta1.IBPOrderer, arg2 baseorder arg1 *v1beta1.IBPOrderer arg2 baseorderer.Update }{arg1, arg2}) - stub := fake.ReconcileStub - fakeReturns := fake.reconcileReturns fake.recordInvocation("Reconcile", []interface{}{arg1, arg2}) fake.reconcileMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ReconcileStub != nil { + return fake.ReconcileStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.reconcileReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/controllers/ibppeer/ibppeer_controller_test.go b/controllers/ibppeer/ibppeer_controller_test.go index 566adcfc..85cee8bb 100644 --- a/controllers/ibppeer/ibppeer_controller_test.go +++ b/controllers/ibppeer/ibppeer_controller_test.go @@ -687,7 +687,6 @@ var _ = Describe("ReconcileIBPPeer", func() { Expect(reconciler.GetUpdateStatus(instance)).To(Equal(&Update{ specUpdated: false, overridesUpdated: false, - dindArgsUpdated: false, })) }) diff --git a/controllers/ibppeer/mocks/peerreconcile.go b/controllers/ibppeer/mocks/peerreconcile.go index 98533fb6..fe51c839 100644 --- a/controllers/ibppeer/mocks/peerreconcile.go +++ b/controllers/ibppeer/mocks/peerreconcile.go @@ -35,16 +35,15 @@ func (fake *PeerReconcile) Reconcile(arg1 *v1beta1.IBPPeer, arg2 basepeer.Update arg1 *v1beta1.IBPPeer arg2 basepeer.Update }{arg1, arg2}) - stub := fake.ReconcileStub - fakeReturns := fake.reconcileReturns fake.recordInvocation("Reconcile", []interface{}{arg1, arg2}) fake.reconcileMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ReconcileStub != nil { + return fake.ReconcileStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.reconcileReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/controllers/ibppeer/predicate.go b/controllers/ibppeer/predicate.go index 1b742669..4b4b313a 100644 --- a/controllers/ibppeer/predicate.go +++ b/controllers/ibppeer/predicate.go @@ -28,7 +28,6 @@ import ( type Update struct { specUpdated bool overridesUpdated bool - dindArgsUpdated bool tlsCertUpdated bool ecertUpdated bool peerTagUpdated bool @@ -60,10 +59,6 @@ func (u *Update) ConfigOverridesUpdated() bool { return u.overridesUpdated } -func (u *Update) DindArgsUpdated() bool { - return u.dindArgsUpdated -} - func (u *Update) TLSCertUpdated() bool { return u.tlsCertUpdated } @@ -133,10 +128,6 @@ func (u *Update) TLSCertEnroll() bool { return u.tlscertEnroll } -func (u *Update) SetDindArgsUpdated(updated bool) { - u.dindArgsUpdated = updated -} - func (u *Update) MSPUpdated() bool { return u.mspUpdated } @@ -189,7 +180,6 @@ func (u *Update) FabricVersionUpdated() bool { func (u *Update) Needed() bool { return u.specUpdated || u.overridesUpdated || - u.dindArgsUpdated || u.tlsCertUpdated || u.ecertUpdated || u.peerTagUpdated || @@ -218,9 +208,7 @@ func (u *Update) GetUpdateStackWithTrues() string { if u.overridesUpdated { stack += "overridesUpdated " } - if u.dindArgsUpdated { - stack += "dindArgsUpdated " - } + if u.tlsCertUpdated { stack += "tlsCertUpdated " } diff --git a/definitions/console/deployer-configmap.yaml b/definitions/console/deployer-configmap.yaml index 149ca313..f5354745 100644 --- a/definitions/console/deployer-configmap.yaml +++ b/definitions/console/deployer-configmap.yaml @@ -131,13 +131,6 @@ data: requests: cpu: 200m memory: 400M - dind: - limits: - cpu: 500m - memory: 1000M - requests: - cpu: 500m - memory: 1000M proxy: limits: cpu: 100m diff --git a/definitions/peer/deployment.yaml b/definitions/peer/deployment.yaml index aa21f038..fc3b124a 100644 --- a/definitions/peer/deployment.yaml +++ b/definitions/peer/deployment.yaml @@ -30,47 +30,6 @@ spec: topologyKey: kubernetes.io/hostname weight: 100 containers: - - env: - - name: LICENSE - value: accept - image: "" - imagePullPolicy: Always - livenessProbe: - failureThreshold: 6 - initialDelaySeconds: 30 - tcpSocket: - port: 2375 - timeoutSeconds: 5 - name: dind - ports: - - containerPort: 2375 - readinessProbe: - exec: - command: - - readiness.sh - initialDelaySeconds: 30 - periodSeconds: 5 - timeoutSeconds: 5 - resources: - limits: - cpu: 500m - memory: 1000M - requests: - cpu: 500m - memory: 1000M - securityContext: - seccompProfile: - type: RuntimeDefault - allowPrivilegeEscalation: true - capabilities: - add: - - NET_BIND_SERVICE - drop: - - ALL - privileged: true - readOnlyRootFilesystem: false - runAsNonRoot: false - runAsUser: 0 - env: - name: LICENSE value: accept @@ -279,4 +238,4 @@ spec: fsGroup: 2000 runAsGroup: 1000 runAsNonRoot: true - runAsUser: 1000 + runAsUser: 1000 \ No newline at end of file diff --git a/integration/helper/crspecs.go b/integration/helper/crspecs.go index 59b60683..9c5c2686 100644 --- a/integration/helper/crspecs.go +++ b/integration/helper/crspecs.go @@ -126,18 +126,6 @@ func Org1PeerCR(namespace, domain, peerUsername, tlsCert, caHost, adminCert stri }, Domain: domain, Resources: ¤t.PeerResources{ - DinD: &corev1.ResourceRequirements{ - Requests: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("500m"), - corev1.ResourceMemory: resource.MustParse("1G"), - corev1.ResourceEphemeralStorage: resource.MustParse("100M"), - }, - Limits: corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("500m"), - corev1.ResourceMemory: resource.MustParse("1G"), - corev1.ResourceEphemeralStorage: resource.MustParse("1G"), - }, - }, CouchDB: &corev1.ResourceRequirements{ Requests: corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("200m"), diff --git a/integration/migration/fabric/peer_test.go b/integration/migration/fabric/peer_test.go index 3367e550..1e5e979e 100644 --- a/integration/migration/fabric/peer_test.go +++ b/integration/migration/fabric/peer_test.go @@ -115,18 +115,6 @@ var _ = Describe("Fabric peer migration", func() { Eventually(peer.PodIsRunning).Should((Equal(true))) }) - By("adding chaincode launcher container and removing dind", func() { - deps := peer.DeploymentList() - dep := deps.Items[0] - - containerNames := []string{} - for _, cont := range dep.Spec.Template.Spec.Containers { - containerNames = append(containerNames, cont.Name) - } - - Expect(containerNames).To(ContainElement("chaincode-launcher")) - Expect(containerNames).NotTo(ContainElement("dind")) - }) }) }) }) @@ -153,11 +141,8 @@ func GetPeer() *helper.Peer { ImagePullSecrets: []string{"regcred"}, Images: ¤t.PeerImages{ // TODO: OSS - CouchDBImage: "ghcr.io/ibm-blockchain/couchdb", - CouchDBTag: "2.3.1-20210826-amd64", - // do not change dind tag, it is used for loading dind faster - DindImage: "ghcr.io/ibm-blockchain/dind", - DindTag: "noimages-amd64", + CouchDBImage: "ghcr.io/ibm-blockchain/couchdb", + CouchDBTag: "2.3.1-20210826-amd64", GRPCWebImage: "ghcr.io/ibm-blockchain/grpcweb", GRPCWebTag: "1.0.0-20210826-amd64", PeerImage: "ghcr.io/ibm-blockchain/peer", diff --git a/integration/peer/peer_test.go b/integration/peer/peer_test.go index f30c9559..a18518d3 100644 --- a/integration/peer/peer_test.go +++ b/integration/peer/peer_test.go @@ -83,18 +83,6 @@ var ( corev1.ResourceEphemeralStorage: resource.MustParse("1G"), } - defaultRequestsDind = corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("10m"), - corev1.ResourceMemory: resource.MustParse("20M"), - corev1.ResourceEphemeralStorage: resource.MustParse("100M"), - } - - defaultLimitsDind = corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("100m"), - corev1.ResourceMemory: resource.MustParse("200M"), - corev1.ResourceEphemeralStorage: resource.MustParse("1G"), - } - defaultRequestsProxy = corev1.ResourceList{ corev1.ResourceCPU: resource.MustParse("10m"), corev1.ResourceMemory: resource.MustParse("20M"), @@ -766,11 +754,6 @@ func GetPeer1() *Peer { }, Domain: integration.TestAutomation1IngressDomain, Resources: ¤t.PeerResources{ - DinD: &corev1.ResourceRequirements{ - - Requests: defaultRequestsDind, - Limits: defaultLimitsDind, - }, Peer: &corev1.ResourceRequirements{ Requests: defaultRequestsPeer, Limits: defaultLimitsPeer, diff --git a/pkg/action/mocks/deploymentreset.go b/pkg/action/mocks/deploymentreset.go index 83614cca..1f27376c 100644 --- a/pkg/action/mocks/deploymentreset.go +++ b/pkg/action/mocks/deploymentreset.go @@ -58,16 +58,15 @@ func (fake *DeploymentReset) DeploymentStatus(arg1 v1a.Object) (v1.DeploymentSta fake.deploymentStatusArgsForCall = append(fake.deploymentStatusArgsForCall, struct { arg1 v1a.Object }{arg1}) - stub := fake.DeploymentStatusStub - fakeReturns := fake.deploymentStatusReturns fake.recordInvocation("DeploymentStatus", []interface{}{arg1}) fake.deploymentStatusMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.DeploymentStatusStub != nil { + return fake.DeploymentStatusStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.deploymentStatusReturns return fakeReturns.result1, fakeReturns.result2 } @@ -122,16 +121,15 @@ func (fake *DeploymentReset) Get(arg1 v1a.Object) (client.Object, error) { fake.getArgsForCall = append(fake.getArgsForCall, struct { arg1 v1a.Object }{arg1}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetStub != nil { + return fake.GetStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getReturns return fakeReturns.result1, fakeReturns.result2 } @@ -185,16 +183,15 @@ func (fake *DeploymentReset) GetScheme() *runtime.Scheme { ret, specificReturn := fake.getSchemeReturnsOnCall[len(fake.getSchemeArgsForCall)] fake.getSchemeArgsForCall = append(fake.getSchemeArgsForCall, struct { }{}) - stub := fake.GetSchemeStub - fakeReturns := fake.getSchemeReturns fake.recordInvocation("GetScheme", []interface{}{}) fake.getSchemeMutex.Unlock() - if stub != nil { - return stub() + if fake.GetSchemeStub != nil { + return fake.GetSchemeStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getSchemeReturns return fakeReturns.result1 } diff --git a/pkg/action/mocks/enrollinstance.go b/pkg/action/mocks/enrollinstance.go index ea4e370c..f7b003a9 100644 --- a/pkg/action/mocks/enrollinstance.go +++ b/pkg/action/mocks/enrollinstance.go @@ -356,16 +356,15 @@ func (fake *EnrollInstance) DeepCopyObject() runtime.Object { ret, specificReturn := fake.deepCopyObjectReturnsOnCall[len(fake.deepCopyObjectArgsForCall)] fake.deepCopyObjectArgsForCall = append(fake.deepCopyObjectArgsForCall, struct { }{}) - stub := fake.DeepCopyObjectStub - fakeReturns := fake.deepCopyObjectReturns fake.recordInvocation("DeepCopyObject", []interface{}{}) fake.deepCopyObjectMutex.Unlock() - if stub != nil { - return stub() + if fake.DeepCopyObjectStub != nil { + return fake.DeepCopyObjectStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.deepCopyObjectReturns return fakeReturns.result1 } @@ -409,16 +408,15 @@ func (fake *EnrollInstance) EnrollerImage() string { ret, specificReturn := fake.enrollerImageReturnsOnCall[len(fake.enrollerImageArgsForCall)] fake.enrollerImageArgsForCall = append(fake.enrollerImageArgsForCall, struct { }{}) - stub := fake.EnrollerImageStub - fakeReturns := fake.enrollerImageReturns fake.recordInvocation("EnrollerImage", []interface{}{}) fake.enrollerImageMutex.Unlock() - if stub != nil { - return stub() + if fake.EnrollerImageStub != nil { + return fake.EnrollerImageStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.enrollerImageReturns return fakeReturns.result1 } @@ -462,16 +460,15 @@ func (fake *EnrollInstance) GetAnnotations() map[string]string { ret, specificReturn := fake.getAnnotationsReturnsOnCall[len(fake.getAnnotationsArgsForCall)] fake.getAnnotationsArgsForCall = append(fake.getAnnotationsArgsForCall, struct { }{}) - stub := fake.GetAnnotationsStub - fakeReturns := fake.getAnnotationsReturns fake.recordInvocation("GetAnnotations", []interface{}{}) fake.getAnnotationsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetAnnotationsStub != nil { + return fake.GetAnnotationsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getAnnotationsReturns return fakeReturns.result1 } @@ -515,16 +512,15 @@ func (fake *EnrollInstance) GetClusterName() string { ret, specificReturn := fake.getClusterNameReturnsOnCall[len(fake.getClusterNameArgsForCall)] fake.getClusterNameArgsForCall = append(fake.getClusterNameArgsForCall, struct { }{}) - stub := fake.GetClusterNameStub - fakeReturns := fake.getClusterNameReturns fake.recordInvocation("GetClusterName", []interface{}{}) fake.getClusterNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetClusterNameStub != nil { + return fake.GetClusterNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getClusterNameReturns return fakeReturns.result1 } @@ -568,16 +564,15 @@ func (fake *EnrollInstance) GetConfigOverride() (interface{}, error) { ret, specificReturn := fake.getConfigOverrideReturnsOnCall[len(fake.getConfigOverrideArgsForCall)] fake.getConfigOverrideArgsForCall = append(fake.getConfigOverrideArgsForCall, struct { }{}) - stub := fake.GetConfigOverrideStub - fakeReturns := fake.getConfigOverrideReturns fake.recordInvocation("GetConfigOverride", []interface{}{}) fake.getConfigOverrideMutex.Unlock() - if stub != nil { - return stub() + if fake.GetConfigOverrideStub != nil { + return fake.GetConfigOverrideStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getConfigOverrideReturns return fakeReturns.result1, fakeReturns.result2 } @@ -624,16 +619,15 @@ func (fake *EnrollInstance) GetCreationTimestamp() v1.Time { ret, specificReturn := fake.getCreationTimestampReturnsOnCall[len(fake.getCreationTimestampArgsForCall)] fake.getCreationTimestampArgsForCall = append(fake.getCreationTimestampArgsForCall, struct { }{}) - stub := fake.GetCreationTimestampStub - fakeReturns := fake.getCreationTimestampReturns fake.recordInvocation("GetCreationTimestamp", []interface{}{}) fake.getCreationTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetCreationTimestampStub != nil { + return fake.GetCreationTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getCreationTimestampReturns return fakeReturns.result1 } @@ -677,16 +671,15 @@ func (fake *EnrollInstance) GetDeletionGracePeriodSeconds() *int64 { ret, specificReturn := fake.getDeletionGracePeriodSecondsReturnsOnCall[len(fake.getDeletionGracePeriodSecondsArgsForCall)] fake.getDeletionGracePeriodSecondsArgsForCall = append(fake.getDeletionGracePeriodSecondsArgsForCall, struct { }{}) - stub := fake.GetDeletionGracePeriodSecondsStub - fakeReturns := fake.getDeletionGracePeriodSecondsReturns fake.recordInvocation("GetDeletionGracePeriodSeconds", []interface{}{}) fake.getDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionGracePeriodSecondsStub != nil { + return fake.GetDeletionGracePeriodSecondsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionGracePeriodSecondsReturns return fakeReturns.result1 } @@ -730,16 +723,15 @@ func (fake *EnrollInstance) GetDeletionTimestamp() *v1.Time { ret, specificReturn := fake.getDeletionTimestampReturnsOnCall[len(fake.getDeletionTimestampArgsForCall)] fake.getDeletionTimestampArgsForCall = append(fake.getDeletionTimestampArgsForCall, struct { }{}) - stub := fake.GetDeletionTimestampStub - fakeReturns := fake.getDeletionTimestampReturns fake.recordInvocation("GetDeletionTimestamp", []interface{}{}) fake.getDeletionTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionTimestampStub != nil { + return fake.GetDeletionTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionTimestampReturns return fakeReturns.result1 } @@ -783,16 +775,15 @@ func (fake *EnrollInstance) GetFinalizers() []string { ret, specificReturn := fake.getFinalizersReturnsOnCall[len(fake.getFinalizersArgsForCall)] fake.getFinalizersArgsForCall = append(fake.getFinalizersArgsForCall, struct { }{}) - stub := fake.GetFinalizersStub - fakeReturns := fake.getFinalizersReturns fake.recordInvocation("GetFinalizers", []interface{}{}) fake.getFinalizersMutex.Unlock() - if stub != nil { - return stub() + if fake.GetFinalizersStub != nil { + return fake.GetFinalizersStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getFinalizersReturns return fakeReturns.result1 } @@ -836,16 +827,15 @@ func (fake *EnrollInstance) GetGenerateName() string { ret, specificReturn := fake.getGenerateNameReturnsOnCall[len(fake.getGenerateNameArgsForCall)] fake.getGenerateNameArgsForCall = append(fake.getGenerateNameArgsForCall, struct { }{}) - stub := fake.GetGenerateNameStub - fakeReturns := fake.getGenerateNameReturns fake.recordInvocation("GetGenerateName", []interface{}{}) fake.getGenerateNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerateNameStub != nil { + return fake.GetGenerateNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerateNameReturns return fakeReturns.result1 } @@ -889,16 +879,15 @@ func (fake *EnrollInstance) GetGeneration() int64 { ret, specificReturn := fake.getGenerationReturnsOnCall[len(fake.getGenerationArgsForCall)] fake.getGenerationArgsForCall = append(fake.getGenerationArgsForCall, struct { }{}) - stub := fake.GetGenerationStub - fakeReturns := fake.getGenerationReturns fake.recordInvocation("GetGeneration", []interface{}{}) fake.getGenerationMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerationStub != nil { + return fake.GetGenerationStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerationReturns return fakeReturns.result1 } @@ -942,16 +931,15 @@ func (fake *EnrollInstance) GetLabels() map[string]string { ret, specificReturn := fake.getLabelsReturnsOnCall[len(fake.getLabelsArgsForCall)] fake.getLabelsArgsForCall = append(fake.getLabelsArgsForCall, struct { }{}) - stub := fake.GetLabelsStub - fakeReturns := fake.getLabelsReturns fake.recordInvocation("GetLabels", []interface{}{}) fake.getLabelsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetLabelsStub != nil { + return fake.GetLabelsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getLabelsReturns return fakeReturns.result1 } @@ -995,16 +983,15 @@ func (fake *EnrollInstance) GetManagedFields() []v1.ManagedFieldsEntry { ret, specificReturn := fake.getManagedFieldsReturnsOnCall[len(fake.getManagedFieldsArgsForCall)] fake.getManagedFieldsArgsForCall = append(fake.getManagedFieldsArgsForCall, struct { }{}) - stub := fake.GetManagedFieldsStub - fakeReturns := fake.getManagedFieldsReturns fake.recordInvocation("GetManagedFields", []interface{}{}) fake.getManagedFieldsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetManagedFieldsStub != nil { + return fake.GetManagedFieldsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getManagedFieldsReturns return fakeReturns.result1 } @@ -1048,16 +1035,15 @@ func (fake *EnrollInstance) GetName() string { ret, specificReturn := fake.getNameReturnsOnCall[len(fake.getNameArgsForCall)] fake.getNameArgsForCall = append(fake.getNameArgsForCall, struct { }{}) - stub := fake.GetNameStub - fakeReturns := fake.getNameReturns fake.recordInvocation("GetName", []interface{}{}) fake.getNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNameStub != nil { + return fake.GetNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNameReturns return fakeReturns.result1 } @@ -1101,16 +1087,15 @@ func (fake *EnrollInstance) GetNamespace() string { ret, specificReturn := fake.getNamespaceReturnsOnCall[len(fake.getNamespaceArgsForCall)] fake.getNamespaceArgsForCall = append(fake.getNamespaceArgsForCall, struct { }{}) - stub := fake.GetNamespaceStub - fakeReturns := fake.getNamespaceReturns fake.recordInvocation("GetNamespace", []interface{}{}) fake.getNamespaceMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNamespaceStub != nil { + return fake.GetNamespaceStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNamespaceReturns return fakeReturns.result1 } @@ -1154,16 +1139,15 @@ func (fake *EnrollInstance) GetObjectKind() schema.ObjectKind { ret, specificReturn := fake.getObjectKindReturnsOnCall[len(fake.getObjectKindArgsForCall)] fake.getObjectKindArgsForCall = append(fake.getObjectKindArgsForCall, struct { }{}) - stub := fake.GetObjectKindStub - fakeReturns := fake.getObjectKindReturns fake.recordInvocation("GetObjectKind", []interface{}{}) fake.getObjectKindMutex.Unlock() - if stub != nil { - return stub() + if fake.GetObjectKindStub != nil { + return fake.GetObjectKindStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getObjectKindReturns return fakeReturns.result1 } @@ -1207,16 +1191,15 @@ func (fake *EnrollInstance) GetOwnerReferences() []v1.OwnerReference { ret, specificReturn := fake.getOwnerReferencesReturnsOnCall[len(fake.getOwnerReferencesArgsForCall)] fake.getOwnerReferencesArgsForCall = append(fake.getOwnerReferencesArgsForCall, struct { }{}) - stub := fake.GetOwnerReferencesStub - fakeReturns := fake.getOwnerReferencesReturns fake.recordInvocation("GetOwnerReferences", []interface{}{}) fake.getOwnerReferencesMutex.Unlock() - if stub != nil { - return stub() + if fake.GetOwnerReferencesStub != nil { + return fake.GetOwnerReferencesStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getOwnerReferencesReturns return fakeReturns.result1 } @@ -1260,16 +1243,15 @@ func (fake *EnrollInstance) GetPullSecrets() []v1a.LocalObjectReference { ret, specificReturn := fake.getPullSecretsReturnsOnCall[len(fake.getPullSecretsArgsForCall)] fake.getPullSecretsArgsForCall = append(fake.getPullSecretsArgsForCall, struct { }{}) - stub := fake.GetPullSecretsStub - fakeReturns := fake.getPullSecretsReturns fake.recordInvocation("GetPullSecrets", []interface{}{}) fake.getPullSecretsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetPullSecretsStub != nil { + return fake.GetPullSecretsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getPullSecretsReturns return fakeReturns.result1 } @@ -1314,16 +1296,15 @@ func (fake *EnrollInstance) GetResource(arg1 v1beta1.Component) v1a.ResourceRequ fake.getResourceArgsForCall = append(fake.getResourceArgsForCall, struct { arg1 v1beta1.Component }{arg1}) - stub := fake.GetResourceStub - fakeReturns := fake.getResourceReturns fake.recordInvocation("GetResource", []interface{}{arg1}) fake.getResourceMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetResourceStub != nil { + return fake.GetResourceStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.getResourceReturns return fakeReturns.result1 } @@ -1374,16 +1355,15 @@ func (fake *EnrollInstance) GetResourceVersion() string { ret, specificReturn := fake.getResourceVersionReturnsOnCall[len(fake.getResourceVersionArgsForCall)] fake.getResourceVersionArgsForCall = append(fake.getResourceVersionArgsForCall, struct { }{}) - stub := fake.GetResourceVersionStub - fakeReturns := fake.getResourceVersionReturns fake.recordInvocation("GetResourceVersion", []interface{}{}) fake.getResourceVersionMutex.Unlock() - if stub != nil { - return stub() + if fake.GetResourceVersionStub != nil { + return fake.GetResourceVersionStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getResourceVersionReturns return fakeReturns.result1 } @@ -1427,16 +1407,15 @@ func (fake *EnrollInstance) GetSelfLink() string { ret, specificReturn := fake.getSelfLinkReturnsOnCall[len(fake.getSelfLinkArgsForCall)] fake.getSelfLinkArgsForCall = append(fake.getSelfLinkArgsForCall, struct { }{}) - stub := fake.GetSelfLinkStub - fakeReturns := fake.getSelfLinkReturns fake.recordInvocation("GetSelfLink", []interface{}{}) fake.getSelfLinkMutex.Unlock() - if stub != nil { - return stub() + if fake.GetSelfLinkStub != nil { + return fake.GetSelfLinkStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getSelfLinkReturns return fakeReturns.result1 } @@ -1480,16 +1459,15 @@ func (fake *EnrollInstance) GetUID() types.UID { ret, specificReturn := fake.getUIDReturnsOnCall[len(fake.getUIDArgsForCall)] fake.getUIDArgsForCall = append(fake.getUIDArgsForCall, struct { }{}) - stub := fake.GetUIDStub - fakeReturns := fake.getUIDReturns fake.recordInvocation("GetUID", []interface{}{}) fake.getUIDMutex.Unlock() - if stub != nil { - return stub() + if fake.GetUIDStub != nil { + return fake.GetUIDStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getUIDReturns return fakeReturns.result1 } @@ -1533,16 +1511,15 @@ func (fake *EnrollInstance) IsHSMEnabled() bool { ret, specificReturn := fake.isHSMEnabledReturnsOnCall[len(fake.isHSMEnabledArgsForCall)] fake.isHSMEnabledArgsForCall = append(fake.isHSMEnabledArgsForCall, struct { }{}) - stub := fake.IsHSMEnabledStub - fakeReturns := fake.isHSMEnabledReturns fake.recordInvocation("IsHSMEnabled", []interface{}{}) fake.isHSMEnabledMutex.Unlock() - if stub != nil { - return stub() + if fake.IsHSMEnabledStub != nil { + return fake.IsHSMEnabledStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.isHSMEnabledReturns return fakeReturns.result1 } @@ -1586,16 +1563,15 @@ func (fake *EnrollInstance) PVCName() string { ret, specificReturn := fake.pVCNameReturnsOnCall[len(fake.pVCNameArgsForCall)] fake.pVCNameArgsForCall = append(fake.pVCNameArgsForCall, struct { }{}) - stub := fake.PVCNameStub - fakeReturns := fake.pVCNameReturns fake.recordInvocation("PVCName", []interface{}{}) fake.pVCNameMutex.Unlock() - if stub != nil { - return stub() + if fake.PVCNameStub != nil { + return fake.PVCNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.pVCNameReturns return fakeReturns.result1 } @@ -1639,10 +1615,9 @@ func (fake *EnrollInstance) SetAnnotations(arg1 map[string]string) { fake.setAnnotationsArgsForCall = append(fake.setAnnotationsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetAnnotationsStub fake.recordInvocation("SetAnnotations", []interface{}{arg1}) fake.setAnnotationsMutex.Unlock() - if stub != nil { + if fake.SetAnnotationsStub != nil { fake.SetAnnotationsStub(arg1) } } @@ -1671,10 +1646,9 @@ func (fake *EnrollInstance) SetClusterName(arg1 string) { fake.setClusterNameArgsForCall = append(fake.setClusterNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetClusterNameStub fake.recordInvocation("SetClusterName", []interface{}{arg1}) fake.setClusterNameMutex.Unlock() - if stub != nil { + if fake.SetClusterNameStub != nil { fake.SetClusterNameStub(arg1) } } @@ -1703,10 +1677,9 @@ func (fake *EnrollInstance) SetCreationTimestamp(arg1 v1.Time) { fake.setCreationTimestampArgsForCall = append(fake.setCreationTimestampArgsForCall, struct { arg1 v1.Time }{arg1}) - stub := fake.SetCreationTimestampStub fake.recordInvocation("SetCreationTimestamp", []interface{}{arg1}) fake.setCreationTimestampMutex.Unlock() - if stub != nil { + if fake.SetCreationTimestampStub != nil { fake.SetCreationTimestampStub(arg1) } } @@ -1735,10 +1708,9 @@ func (fake *EnrollInstance) SetDeletionGracePeriodSeconds(arg1 *int64) { fake.setDeletionGracePeriodSecondsArgsForCall = append(fake.setDeletionGracePeriodSecondsArgsForCall, struct { arg1 *int64 }{arg1}) - stub := fake.SetDeletionGracePeriodSecondsStub fake.recordInvocation("SetDeletionGracePeriodSeconds", []interface{}{arg1}) fake.setDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { + if fake.SetDeletionGracePeriodSecondsStub != nil { fake.SetDeletionGracePeriodSecondsStub(arg1) } } @@ -1767,10 +1739,9 @@ func (fake *EnrollInstance) SetDeletionTimestamp(arg1 *v1.Time) { fake.setDeletionTimestampArgsForCall = append(fake.setDeletionTimestampArgsForCall, struct { arg1 *v1.Time }{arg1}) - stub := fake.SetDeletionTimestampStub fake.recordInvocation("SetDeletionTimestamp", []interface{}{arg1}) fake.setDeletionTimestampMutex.Unlock() - if stub != nil { + if fake.SetDeletionTimestampStub != nil { fake.SetDeletionTimestampStub(arg1) } } @@ -1804,10 +1775,9 @@ func (fake *EnrollInstance) SetFinalizers(arg1 []string) { fake.setFinalizersArgsForCall = append(fake.setFinalizersArgsForCall, struct { arg1 []string }{arg1Copy}) - stub := fake.SetFinalizersStub fake.recordInvocation("SetFinalizers", []interface{}{arg1Copy}) fake.setFinalizersMutex.Unlock() - if stub != nil { + if fake.SetFinalizersStub != nil { fake.SetFinalizersStub(arg1) } } @@ -1836,10 +1806,9 @@ func (fake *EnrollInstance) SetGenerateName(arg1 string) { fake.setGenerateNameArgsForCall = append(fake.setGenerateNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetGenerateNameStub fake.recordInvocation("SetGenerateName", []interface{}{arg1}) fake.setGenerateNameMutex.Unlock() - if stub != nil { + if fake.SetGenerateNameStub != nil { fake.SetGenerateNameStub(arg1) } } @@ -1868,10 +1837,9 @@ func (fake *EnrollInstance) SetGeneration(arg1 int64) { fake.setGenerationArgsForCall = append(fake.setGenerationArgsForCall, struct { arg1 int64 }{arg1}) - stub := fake.SetGenerationStub fake.recordInvocation("SetGeneration", []interface{}{arg1}) fake.setGenerationMutex.Unlock() - if stub != nil { + if fake.SetGenerationStub != nil { fake.SetGenerationStub(arg1) } } @@ -1900,10 +1868,9 @@ func (fake *EnrollInstance) SetLabels(arg1 map[string]string) { fake.setLabelsArgsForCall = append(fake.setLabelsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetLabelsStub fake.recordInvocation("SetLabels", []interface{}{arg1}) fake.setLabelsMutex.Unlock() - if stub != nil { + if fake.SetLabelsStub != nil { fake.SetLabelsStub(arg1) } } @@ -1937,10 +1904,9 @@ func (fake *EnrollInstance) SetManagedFields(arg1 []v1.ManagedFieldsEntry) { fake.setManagedFieldsArgsForCall = append(fake.setManagedFieldsArgsForCall, struct { arg1 []v1.ManagedFieldsEntry }{arg1Copy}) - stub := fake.SetManagedFieldsStub fake.recordInvocation("SetManagedFields", []interface{}{arg1Copy}) fake.setManagedFieldsMutex.Unlock() - if stub != nil { + if fake.SetManagedFieldsStub != nil { fake.SetManagedFieldsStub(arg1) } } @@ -1969,10 +1935,9 @@ func (fake *EnrollInstance) SetName(arg1 string) { fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNameStub fake.recordInvocation("SetName", []interface{}{arg1}) fake.setNameMutex.Unlock() - if stub != nil { + if fake.SetNameStub != nil { fake.SetNameStub(arg1) } } @@ -2001,10 +1966,9 @@ func (fake *EnrollInstance) SetNamespace(arg1 string) { fake.setNamespaceArgsForCall = append(fake.setNamespaceArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNamespaceStub fake.recordInvocation("SetNamespace", []interface{}{arg1}) fake.setNamespaceMutex.Unlock() - if stub != nil { + if fake.SetNamespaceStub != nil { fake.SetNamespaceStub(arg1) } } @@ -2038,10 +2002,9 @@ func (fake *EnrollInstance) SetOwnerReferences(arg1 []v1.OwnerReference) { fake.setOwnerReferencesArgsForCall = append(fake.setOwnerReferencesArgsForCall, struct { arg1 []v1.OwnerReference }{arg1Copy}) - stub := fake.SetOwnerReferencesStub fake.recordInvocation("SetOwnerReferences", []interface{}{arg1Copy}) fake.setOwnerReferencesMutex.Unlock() - if stub != nil { + if fake.SetOwnerReferencesStub != nil { fake.SetOwnerReferencesStub(arg1) } } @@ -2070,10 +2033,9 @@ func (fake *EnrollInstance) SetResourceVersion(arg1 string) { fake.setResourceVersionArgsForCall = append(fake.setResourceVersionArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetResourceVersionStub fake.recordInvocation("SetResourceVersion", []interface{}{arg1}) fake.setResourceVersionMutex.Unlock() - if stub != nil { + if fake.SetResourceVersionStub != nil { fake.SetResourceVersionStub(arg1) } } @@ -2102,10 +2064,9 @@ func (fake *EnrollInstance) SetSelfLink(arg1 string) { fake.setSelfLinkArgsForCall = append(fake.setSelfLinkArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetSelfLinkStub fake.recordInvocation("SetSelfLink", []interface{}{arg1}) fake.setSelfLinkMutex.Unlock() - if stub != nil { + if fake.SetSelfLinkStub != nil { fake.SetSelfLinkStub(arg1) } } @@ -2134,10 +2095,9 @@ func (fake *EnrollInstance) SetUID(arg1 types.UID) { fake.setUIDArgsForCall = append(fake.setUIDArgsForCall, struct { arg1 types.UID }{arg1}) - stub := fake.SetUIDStub fake.recordInvocation("SetUID", []interface{}{arg1}) fake.setUIDMutex.Unlock() - if stub != nil { + if fake.SetUIDStub != nil { fake.SetUIDStub(arg1) } } @@ -2166,16 +2126,15 @@ func (fake *EnrollInstance) UsingHSMProxy() bool { ret, specificReturn := fake.usingHSMProxyReturnsOnCall[len(fake.usingHSMProxyArgsForCall)] fake.usingHSMProxyArgsForCall = append(fake.usingHSMProxyArgsForCall, struct { }{}) - stub := fake.UsingHSMProxyStub - fakeReturns := fake.usingHSMProxyReturns fake.recordInvocation("UsingHSMProxy", []interface{}{}) fake.usingHSMProxyMutex.Unlock() - if stub != nil { - return stub() + if fake.UsingHSMProxyStub != nil { + return fake.UsingHSMProxyStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.usingHSMProxyReturns return fakeReturns.result1 } diff --git a/pkg/action/mocks/reenroller.go b/pkg/action/mocks/reenroller.go index 0f2d845c..5d7910b7 100644 --- a/pkg/action/mocks/reenroller.go +++ b/pkg/action/mocks/reenroller.go @@ -35,16 +35,15 @@ func (fake *Reenroller) RenewCert(arg1 common.SecretType, arg2 runtime.Object, a arg2 runtime.Object arg3 bool }{arg1, arg2, arg3}) - stub := fake.RenewCertStub - fakeReturns := fake.renewCertReturns fake.recordInvocation("RenewCert", []interface{}{arg1, arg2, arg3}) fake.renewCertMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.RenewCertStub != nil { + return fake.RenewCertStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.renewCertReturns return fakeReturns.result1 } diff --git a/pkg/action/mocks/reenrollinstance.go b/pkg/action/mocks/reenrollinstance.go index 6e9e1da8..9e8809bf 100644 --- a/pkg/action/mocks/reenrollinstance.go +++ b/pkg/action/mocks/reenrollinstance.go @@ -289,16 +289,15 @@ func (fake *ReenrollInstance) DeepCopyObject() runtime.Object { ret, specificReturn := fake.deepCopyObjectReturnsOnCall[len(fake.deepCopyObjectArgsForCall)] fake.deepCopyObjectArgsForCall = append(fake.deepCopyObjectArgsForCall, struct { }{}) - stub := fake.DeepCopyObjectStub - fakeReturns := fake.deepCopyObjectReturns fake.recordInvocation("DeepCopyObject", []interface{}{}) fake.deepCopyObjectMutex.Unlock() - if stub != nil { - return stub() + if fake.DeepCopyObjectStub != nil { + return fake.DeepCopyObjectStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.deepCopyObjectReturns return fakeReturns.result1 } @@ -342,16 +341,15 @@ func (fake *ReenrollInstance) GetAnnotations() map[string]string { ret, specificReturn := fake.getAnnotationsReturnsOnCall[len(fake.getAnnotationsArgsForCall)] fake.getAnnotationsArgsForCall = append(fake.getAnnotationsArgsForCall, struct { }{}) - stub := fake.GetAnnotationsStub - fakeReturns := fake.getAnnotationsReturns fake.recordInvocation("GetAnnotations", []interface{}{}) fake.getAnnotationsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetAnnotationsStub != nil { + return fake.GetAnnotationsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getAnnotationsReturns return fakeReturns.result1 } @@ -395,16 +393,15 @@ func (fake *ReenrollInstance) GetClusterName() string { ret, specificReturn := fake.getClusterNameReturnsOnCall[len(fake.getClusterNameArgsForCall)] fake.getClusterNameArgsForCall = append(fake.getClusterNameArgsForCall, struct { }{}) - stub := fake.GetClusterNameStub - fakeReturns := fake.getClusterNameReturns fake.recordInvocation("GetClusterName", []interface{}{}) fake.getClusterNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetClusterNameStub != nil { + return fake.GetClusterNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getClusterNameReturns return fakeReturns.result1 } @@ -448,16 +445,15 @@ func (fake *ReenrollInstance) GetCreationTimestamp() v1.Time { ret, specificReturn := fake.getCreationTimestampReturnsOnCall[len(fake.getCreationTimestampArgsForCall)] fake.getCreationTimestampArgsForCall = append(fake.getCreationTimestampArgsForCall, struct { }{}) - stub := fake.GetCreationTimestampStub - fakeReturns := fake.getCreationTimestampReturns fake.recordInvocation("GetCreationTimestamp", []interface{}{}) fake.getCreationTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetCreationTimestampStub != nil { + return fake.GetCreationTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getCreationTimestampReturns return fakeReturns.result1 } @@ -501,16 +497,15 @@ func (fake *ReenrollInstance) GetDeletionGracePeriodSeconds() *int64 { ret, specificReturn := fake.getDeletionGracePeriodSecondsReturnsOnCall[len(fake.getDeletionGracePeriodSecondsArgsForCall)] fake.getDeletionGracePeriodSecondsArgsForCall = append(fake.getDeletionGracePeriodSecondsArgsForCall, struct { }{}) - stub := fake.GetDeletionGracePeriodSecondsStub - fakeReturns := fake.getDeletionGracePeriodSecondsReturns fake.recordInvocation("GetDeletionGracePeriodSeconds", []interface{}{}) fake.getDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionGracePeriodSecondsStub != nil { + return fake.GetDeletionGracePeriodSecondsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionGracePeriodSecondsReturns return fakeReturns.result1 } @@ -554,16 +549,15 @@ func (fake *ReenrollInstance) GetDeletionTimestamp() *v1.Time { ret, specificReturn := fake.getDeletionTimestampReturnsOnCall[len(fake.getDeletionTimestampArgsForCall)] fake.getDeletionTimestampArgsForCall = append(fake.getDeletionTimestampArgsForCall, struct { }{}) - stub := fake.GetDeletionTimestampStub - fakeReturns := fake.getDeletionTimestampReturns fake.recordInvocation("GetDeletionTimestamp", []interface{}{}) fake.getDeletionTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionTimestampStub != nil { + return fake.GetDeletionTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionTimestampReturns return fakeReturns.result1 } @@ -607,16 +601,15 @@ func (fake *ReenrollInstance) GetFinalizers() []string { ret, specificReturn := fake.getFinalizersReturnsOnCall[len(fake.getFinalizersArgsForCall)] fake.getFinalizersArgsForCall = append(fake.getFinalizersArgsForCall, struct { }{}) - stub := fake.GetFinalizersStub - fakeReturns := fake.getFinalizersReturns fake.recordInvocation("GetFinalizers", []interface{}{}) fake.getFinalizersMutex.Unlock() - if stub != nil { - return stub() + if fake.GetFinalizersStub != nil { + return fake.GetFinalizersStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getFinalizersReturns return fakeReturns.result1 } @@ -660,16 +653,15 @@ func (fake *ReenrollInstance) GetGenerateName() string { ret, specificReturn := fake.getGenerateNameReturnsOnCall[len(fake.getGenerateNameArgsForCall)] fake.getGenerateNameArgsForCall = append(fake.getGenerateNameArgsForCall, struct { }{}) - stub := fake.GetGenerateNameStub - fakeReturns := fake.getGenerateNameReturns fake.recordInvocation("GetGenerateName", []interface{}{}) fake.getGenerateNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerateNameStub != nil { + return fake.GetGenerateNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerateNameReturns return fakeReturns.result1 } @@ -713,16 +705,15 @@ func (fake *ReenrollInstance) GetGeneration() int64 { ret, specificReturn := fake.getGenerationReturnsOnCall[len(fake.getGenerationArgsForCall)] fake.getGenerationArgsForCall = append(fake.getGenerationArgsForCall, struct { }{}) - stub := fake.GetGenerationStub - fakeReturns := fake.getGenerationReturns fake.recordInvocation("GetGeneration", []interface{}{}) fake.getGenerationMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerationStub != nil { + return fake.GetGenerationStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerationReturns return fakeReturns.result1 } @@ -766,16 +757,15 @@ func (fake *ReenrollInstance) GetLabels() map[string]string { ret, specificReturn := fake.getLabelsReturnsOnCall[len(fake.getLabelsArgsForCall)] fake.getLabelsArgsForCall = append(fake.getLabelsArgsForCall, struct { }{}) - stub := fake.GetLabelsStub - fakeReturns := fake.getLabelsReturns fake.recordInvocation("GetLabels", []interface{}{}) fake.getLabelsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetLabelsStub != nil { + return fake.GetLabelsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getLabelsReturns return fakeReturns.result1 } @@ -819,16 +809,15 @@ func (fake *ReenrollInstance) GetManagedFields() []v1.ManagedFieldsEntry { ret, specificReturn := fake.getManagedFieldsReturnsOnCall[len(fake.getManagedFieldsArgsForCall)] fake.getManagedFieldsArgsForCall = append(fake.getManagedFieldsArgsForCall, struct { }{}) - stub := fake.GetManagedFieldsStub - fakeReturns := fake.getManagedFieldsReturns fake.recordInvocation("GetManagedFields", []interface{}{}) fake.getManagedFieldsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetManagedFieldsStub != nil { + return fake.GetManagedFieldsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getManagedFieldsReturns return fakeReturns.result1 } @@ -872,16 +861,15 @@ func (fake *ReenrollInstance) GetName() string { ret, specificReturn := fake.getNameReturnsOnCall[len(fake.getNameArgsForCall)] fake.getNameArgsForCall = append(fake.getNameArgsForCall, struct { }{}) - stub := fake.GetNameStub - fakeReturns := fake.getNameReturns fake.recordInvocation("GetName", []interface{}{}) fake.getNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNameStub != nil { + return fake.GetNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNameReturns return fakeReturns.result1 } @@ -925,16 +913,15 @@ func (fake *ReenrollInstance) GetNamespace() string { ret, specificReturn := fake.getNamespaceReturnsOnCall[len(fake.getNamespaceArgsForCall)] fake.getNamespaceArgsForCall = append(fake.getNamespaceArgsForCall, struct { }{}) - stub := fake.GetNamespaceStub - fakeReturns := fake.getNamespaceReturns fake.recordInvocation("GetNamespace", []interface{}{}) fake.getNamespaceMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNamespaceStub != nil { + return fake.GetNamespaceStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNamespaceReturns return fakeReturns.result1 } @@ -978,16 +965,15 @@ func (fake *ReenrollInstance) GetObjectKind() schema.ObjectKind { ret, specificReturn := fake.getObjectKindReturnsOnCall[len(fake.getObjectKindArgsForCall)] fake.getObjectKindArgsForCall = append(fake.getObjectKindArgsForCall, struct { }{}) - stub := fake.GetObjectKindStub - fakeReturns := fake.getObjectKindReturns fake.recordInvocation("GetObjectKind", []interface{}{}) fake.getObjectKindMutex.Unlock() - if stub != nil { - return stub() + if fake.GetObjectKindStub != nil { + return fake.GetObjectKindStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getObjectKindReturns return fakeReturns.result1 } @@ -1031,16 +1017,15 @@ func (fake *ReenrollInstance) GetOwnerReferences() []v1.OwnerReference { ret, specificReturn := fake.getOwnerReferencesReturnsOnCall[len(fake.getOwnerReferencesArgsForCall)] fake.getOwnerReferencesArgsForCall = append(fake.getOwnerReferencesArgsForCall, struct { }{}) - stub := fake.GetOwnerReferencesStub - fakeReturns := fake.getOwnerReferencesReturns fake.recordInvocation("GetOwnerReferences", []interface{}{}) fake.getOwnerReferencesMutex.Unlock() - if stub != nil { - return stub() + if fake.GetOwnerReferencesStub != nil { + return fake.GetOwnerReferencesStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getOwnerReferencesReturns return fakeReturns.result1 } @@ -1084,16 +1069,15 @@ func (fake *ReenrollInstance) GetResourceVersion() string { ret, specificReturn := fake.getResourceVersionReturnsOnCall[len(fake.getResourceVersionArgsForCall)] fake.getResourceVersionArgsForCall = append(fake.getResourceVersionArgsForCall, struct { }{}) - stub := fake.GetResourceVersionStub - fakeReturns := fake.getResourceVersionReturns fake.recordInvocation("GetResourceVersion", []interface{}{}) fake.getResourceVersionMutex.Unlock() - if stub != nil { - return stub() + if fake.GetResourceVersionStub != nil { + return fake.GetResourceVersionStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getResourceVersionReturns return fakeReturns.result1 } @@ -1137,16 +1121,15 @@ func (fake *ReenrollInstance) GetSelfLink() string { ret, specificReturn := fake.getSelfLinkReturnsOnCall[len(fake.getSelfLinkArgsForCall)] fake.getSelfLinkArgsForCall = append(fake.getSelfLinkArgsForCall, struct { }{}) - stub := fake.GetSelfLinkStub - fakeReturns := fake.getSelfLinkReturns fake.recordInvocation("GetSelfLink", []interface{}{}) fake.getSelfLinkMutex.Unlock() - if stub != nil { - return stub() + if fake.GetSelfLinkStub != nil { + return fake.GetSelfLinkStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getSelfLinkReturns return fakeReturns.result1 } @@ -1190,16 +1173,15 @@ func (fake *ReenrollInstance) GetUID() types.UID { ret, specificReturn := fake.getUIDReturnsOnCall[len(fake.getUIDArgsForCall)] fake.getUIDArgsForCall = append(fake.getUIDArgsForCall, struct { }{}) - stub := fake.GetUIDStub - fakeReturns := fake.getUIDReturns fake.recordInvocation("GetUID", []interface{}{}) fake.getUIDMutex.Unlock() - if stub != nil { - return stub() + if fake.GetUIDStub != nil { + return fake.GetUIDStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getUIDReturns return fakeReturns.result1 } @@ -1242,10 +1224,9 @@ func (fake *ReenrollInstance) ResetEcertReenroll() { fake.resetEcertReenrollMutex.Lock() fake.resetEcertReenrollArgsForCall = append(fake.resetEcertReenrollArgsForCall, struct { }{}) - stub := fake.ResetEcertReenrollStub fake.recordInvocation("ResetEcertReenroll", []interface{}{}) fake.resetEcertReenrollMutex.Unlock() - if stub != nil { + if fake.ResetEcertReenrollStub != nil { fake.ResetEcertReenrollStub() } } @@ -1266,10 +1247,9 @@ func (fake *ReenrollInstance) ResetTLSReenroll() { fake.resetTLSReenrollMutex.Lock() fake.resetTLSReenrollArgsForCall = append(fake.resetTLSReenrollArgsForCall, struct { }{}) - stub := fake.ResetTLSReenrollStub fake.recordInvocation("ResetTLSReenroll", []interface{}{}) fake.resetTLSReenrollMutex.Unlock() - if stub != nil { + if fake.ResetTLSReenrollStub != nil { fake.ResetTLSReenrollStub() } } @@ -1291,10 +1271,9 @@ func (fake *ReenrollInstance) SetAnnotations(arg1 map[string]string) { fake.setAnnotationsArgsForCall = append(fake.setAnnotationsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetAnnotationsStub fake.recordInvocation("SetAnnotations", []interface{}{arg1}) fake.setAnnotationsMutex.Unlock() - if stub != nil { + if fake.SetAnnotationsStub != nil { fake.SetAnnotationsStub(arg1) } } @@ -1323,10 +1302,9 @@ func (fake *ReenrollInstance) SetClusterName(arg1 string) { fake.setClusterNameArgsForCall = append(fake.setClusterNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetClusterNameStub fake.recordInvocation("SetClusterName", []interface{}{arg1}) fake.setClusterNameMutex.Unlock() - if stub != nil { + if fake.SetClusterNameStub != nil { fake.SetClusterNameStub(arg1) } } @@ -1355,10 +1333,9 @@ func (fake *ReenrollInstance) SetCreationTimestamp(arg1 v1.Time) { fake.setCreationTimestampArgsForCall = append(fake.setCreationTimestampArgsForCall, struct { arg1 v1.Time }{arg1}) - stub := fake.SetCreationTimestampStub fake.recordInvocation("SetCreationTimestamp", []interface{}{arg1}) fake.setCreationTimestampMutex.Unlock() - if stub != nil { + if fake.SetCreationTimestampStub != nil { fake.SetCreationTimestampStub(arg1) } } @@ -1387,10 +1364,9 @@ func (fake *ReenrollInstance) SetDeletionGracePeriodSeconds(arg1 *int64) { fake.setDeletionGracePeriodSecondsArgsForCall = append(fake.setDeletionGracePeriodSecondsArgsForCall, struct { arg1 *int64 }{arg1}) - stub := fake.SetDeletionGracePeriodSecondsStub fake.recordInvocation("SetDeletionGracePeriodSeconds", []interface{}{arg1}) fake.setDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { + if fake.SetDeletionGracePeriodSecondsStub != nil { fake.SetDeletionGracePeriodSecondsStub(arg1) } } @@ -1419,10 +1395,9 @@ func (fake *ReenrollInstance) SetDeletionTimestamp(arg1 *v1.Time) { fake.setDeletionTimestampArgsForCall = append(fake.setDeletionTimestampArgsForCall, struct { arg1 *v1.Time }{arg1}) - stub := fake.SetDeletionTimestampStub fake.recordInvocation("SetDeletionTimestamp", []interface{}{arg1}) fake.setDeletionTimestampMutex.Unlock() - if stub != nil { + if fake.SetDeletionTimestampStub != nil { fake.SetDeletionTimestampStub(arg1) } } @@ -1456,10 +1431,9 @@ func (fake *ReenrollInstance) SetFinalizers(arg1 []string) { fake.setFinalizersArgsForCall = append(fake.setFinalizersArgsForCall, struct { arg1 []string }{arg1Copy}) - stub := fake.SetFinalizersStub fake.recordInvocation("SetFinalizers", []interface{}{arg1Copy}) fake.setFinalizersMutex.Unlock() - if stub != nil { + if fake.SetFinalizersStub != nil { fake.SetFinalizersStub(arg1) } } @@ -1488,10 +1462,9 @@ func (fake *ReenrollInstance) SetGenerateName(arg1 string) { fake.setGenerateNameArgsForCall = append(fake.setGenerateNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetGenerateNameStub fake.recordInvocation("SetGenerateName", []interface{}{arg1}) fake.setGenerateNameMutex.Unlock() - if stub != nil { + if fake.SetGenerateNameStub != nil { fake.SetGenerateNameStub(arg1) } } @@ -1520,10 +1493,9 @@ func (fake *ReenrollInstance) SetGeneration(arg1 int64) { fake.setGenerationArgsForCall = append(fake.setGenerationArgsForCall, struct { arg1 int64 }{arg1}) - stub := fake.SetGenerationStub fake.recordInvocation("SetGeneration", []interface{}{arg1}) fake.setGenerationMutex.Unlock() - if stub != nil { + if fake.SetGenerationStub != nil { fake.SetGenerationStub(arg1) } } @@ -1552,10 +1524,9 @@ func (fake *ReenrollInstance) SetLabels(arg1 map[string]string) { fake.setLabelsArgsForCall = append(fake.setLabelsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetLabelsStub fake.recordInvocation("SetLabels", []interface{}{arg1}) fake.setLabelsMutex.Unlock() - if stub != nil { + if fake.SetLabelsStub != nil { fake.SetLabelsStub(arg1) } } @@ -1589,10 +1560,9 @@ func (fake *ReenrollInstance) SetManagedFields(arg1 []v1.ManagedFieldsEntry) { fake.setManagedFieldsArgsForCall = append(fake.setManagedFieldsArgsForCall, struct { arg1 []v1.ManagedFieldsEntry }{arg1Copy}) - stub := fake.SetManagedFieldsStub fake.recordInvocation("SetManagedFields", []interface{}{arg1Copy}) fake.setManagedFieldsMutex.Unlock() - if stub != nil { + if fake.SetManagedFieldsStub != nil { fake.SetManagedFieldsStub(arg1) } } @@ -1621,10 +1591,9 @@ func (fake *ReenrollInstance) SetName(arg1 string) { fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNameStub fake.recordInvocation("SetName", []interface{}{arg1}) fake.setNameMutex.Unlock() - if stub != nil { + if fake.SetNameStub != nil { fake.SetNameStub(arg1) } } @@ -1653,10 +1622,9 @@ func (fake *ReenrollInstance) SetNamespace(arg1 string) { fake.setNamespaceArgsForCall = append(fake.setNamespaceArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNamespaceStub fake.recordInvocation("SetNamespace", []interface{}{arg1}) fake.setNamespaceMutex.Unlock() - if stub != nil { + if fake.SetNamespaceStub != nil { fake.SetNamespaceStub(arg1) } } @@ -1690,10 +1658,9 @@ func (fake *ReenrollInstance) SetOwnerReferences(arg1 []v1.OwnerReference) { fake.setOwnerReferencesArgsForCall = append(fake.setOwnerReferencesArgsForCall, struct { arg1 []v1.OwnerReference }{arg1Copy}) - stub := fake.SetOwnerReferencesStub fake.recordInvocation("SetOwnerReferences", []interface{}{arg1Copy}) fake.setOwnerReferencesMutex.Unlock() - if stub != nil { + if fake.SetOwnerReferencesStub != nil { fake.SetOwnerReferencesStub(arg1) } } @@ -1722,10 +1689,9 @@ func (fake *ReenrollInstance) SetResourceVersion(arg1 string) { fake.setResourceVersionArgsForCall = append(fake.setResourceVersionArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetResourceVersionStub fake.recordInvocation("SetResourceVersion", []interface{}{arg1}) fake.setResourceVersionMutex.Unlock() - if stub != nil { + if fake.SetResourceVersionStub != nil { fake.SetResourceVersionStub(arg1) } } @@ -1754,10 +1720,9 @@ func (fake *ReenrollInstance) SetSelfLink(arg1 string) { fake.setSelfLinkArgsForCall = append(fake.setSelfLinkArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetSelfLinkStub fake.recordInvocation("SetSelfLink", []interface{}{arg1}) fake.setSelfLinkMutex.Unlock() - if stub != nil { + if fake.SetSelfLinkStub != nil { fake.SetSelfLinkStub(arg1) } } @@ -1786,10 +1751,9 @@ func (fake *ReenrollInstance) SetUID(arg1 types.UID) { fake.setUIDArgsForCall = append(fake.setUIDArgsForCall, struct { arg1 types.UID }{arg1}) - stub := fake.SetUIDStub fake.recordInvocation("SetUID", []interface{}{arg1}) fake.setUIDMutex.Unlock() - if stub != nil { + if fake.SetUIDStub != nil { fake.SetUIDStub(arg1) } } diff --git a/pkg/action/mocks/upgradeinstance.go b/pkg/action/mocks/upgradeinstance.go index 8c9a0fcd..42e3a8ca 100644 --- a/pkg/action/mocks/upgradeinstance.go +++ b/pkg/action/mocks/upgradeinstance.go @@ -311,16 +311,15 @@ func (fake *UpgradeInstance) DeepCopyObject() runtime.Object { ret, specificReturn := fake.deepCopyObjectReturnsOnCall[len(fake.deepCopyObjectArgsForCall)] fake.deepCopyObjectArgsForCall = append(fake.deepCopyObjectArgsForCall, struct { }{}) - stub := fake.DeepCopyObjectStub - fakeReturns := fake.deepCopyObjectReturns fake.recordInvocation("DeepCopyObject", []interface{}{}) fake.deepCopyObjectMutex.Unlock() - if stub != nil { - return stub() + if fake.DeepCopyObjectStub != nil { + return fake.DeepCopyObjectStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.deepCopyObjectReturns return fakeReturns.result1 } @@ -364,16 +363,15 @@ func (fake *UpgradeInstance) GetAnnotations() map[string]string { ret, specificReturn := fake.getAnnotationsReturnsOnCall[len(fake.getAnnotationsArgsForCall)] fake.getAnnotationsArgsForCall = append(fake.getAnnotationsArgsForCall, struct { }{}) - stub := fake.GetAnnotationsStub - fakeReturns := fake.getAnnotationsReturns fake.recordInvocation("GetAnnotations", []interface{}{}) fake.getAnnotationsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetAnnotationsStub != nil { + return fake.GetAnnotationsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getAnnotationsReturns return fakeReturns.result1 } @@ -417,16 +415,15 @@ func (fake *UpgradeInstance) GetClusterName() string { ret, specificReturn := fake.getClusterNameReturnsOnCall[len(fake.getClusterNameArgsForCall)] fake.getClusterNameArgsForCall = append(fake.getClusterNameArgsForCall, struct { }{}) - stub := fake.GetClusterNameStub - fakeReturns := fake.getClusterNameReturns fake.recordInvocation("GetClusterName", []interface{}{}) fake.getClusterNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetClusterNameStub != nil { + return fake.GetClusterNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getClusterNameReturns return fakeReturns.result1 } @@ -470,16 +467,15 @@ func (fake *UpgradeInstance) GetCreationTimestamp() v1.Time { ret, specificReturn := fake.getCreationTimestampReturnsOnCall[len(fake.getCreationTimestampArgsForCall)] fake.getCreationTimestampArgsForCall = append(fake.getCreationTimestampArgsForCall, struct { }{}) - stub := fake.GetCreationTimestampStub - fakeReturns := fake.getCreationTimestampReturns fake.recordInvocation("GetCreationTimestamp", []interface{}{}) fake.getCreationTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetCreationTimestampStub != nil { + return fake.GetCreationTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getCreationTimestampReturns return fakeReturns.result1 } @@ -523,16 +519,15 @@ func (fake *UpgradeInstance) GetDeletionGracePeriodSeconds() *int64 { ret, specificReturn := fake.getDeletionGracePeriodSecondsReturnsOnCall[len(fake.getDeletionGracePeriodSecondsArgsForCall)] fake.getDeletionGracePeriodSecondsArgsForCall = append(fake.getDeletionGracePeriodSecondsArgsForCall, struct { }{}) - stub := fake.GetDeletionGracePeriodSecondsStub - fakeReturns := fake.getDeletionGracePeriodSecondsReturns fake.recordInvocation("GetDeletionGracePeriodSeconds", []interface{}{}) fake.getDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionGracePeriodSecondsStub != nil { + return fake.GetDeletionGracePeriodSecondsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionGracePeriodSecondsReturns return fakeReturns.result1 } @@ -576,16 +571,15 @@ func (fake *UpgradeInstance) GetDeletionTimestamp() *v1.Time { ret, specificReturn := fake.getDeletionTimestampReturnsOnCall[len(fake.getDeletionTimestampArgsForCall)] fake.getDeletionTimestampArgsForCall = append(fake.getDeletionTimestampArgsForCall, struct { }{}) - stub := fake.GetDeletionTimestampStub - fakeReturns := fake.getDeletionTimestampReturns fake.recordInvocation("GetDeletionTimestamp", []interface{}{}) fake.getDeletionTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionTimestampStub != nil { + return fake.GetDeletionTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionTimestampReturns return fakeReturns.result1 } @@ -629,16 +623,15 @@ func (fake *UpgradeInstance) GetFinalizers() []string { ret, specificReturn := fake.getFinalizersReturnsOnCall[len(fake.getFinalizersArgsForCall)] fake.getFinalizersArgsForCall = append(fake.getFinalizersArgsForCall, struct { }{}) - stub := fake.GetFinalizersStub - fakeReturns := fake.getFinalizersReturns fake.recordInvocation("GetFinalizers", []interface{}{}) fake.getFinalizersMutex.Unlock() - if stub != nil { - return stub() + if fake.GetFinalizersStub != nil { + return fake.GetFinalizersStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getFinalizersReturns return fakeReturns.result1 } @@ -682,16 +675,15 @@ func (fake *UpgradeInstance) GetGenerateName() string { ret, specificReturn := fake.getGenerateNameReturnsOnCall[len(fake.getGenerateNameArgsForCall)] fake.getGenerateNameArgsForCall = append(fake.getGenerateNameArgsForCall, struct { }{}) - stub := fake.GetGenerateNameStub - fakeReturns := fake.getGenerateNameReturns fake.recordInvocation("GetGenerateName", []interface{}{}) fake.getGenerateNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerateNameStub != nil { + return fake.GetGenerateNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerateNameReturns return fakeReturns.result1 } @@ -735,16 +727,15 @@ func (fake *UpgradeInstance) GetGeneration() int64 { ret, specificReturn := fake.getGenerationReturnsOnCall[len(fake.getGenerationArgsForCall)] fake.getGenerationArgsForCall = append(fake.getGenerationArgsForCall, struct { }{}) - stub := fake.GetGenerationStub - fakeReturns := fake.getGenerationReturns fake.recordInvocation("GetGeneration", []interface{}{}) fake.getGenerationMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerationStub != nil { + return fake.GetGenerationStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerationReturns return fakeReturns.result1 } @@ -788,16 +779,15 @@ func (fake *UpgradeInstance) GetLabels() map[string]string { ret, specificReturn := fake.getLabelsReturnsOnCall[len(fake.getLabelsArgsForCall)] fake.getLabelsArgsForCall = append(fake.getLabelsArgsForCall, struct { }{}) - stub := fake.GetLabelsStub - fakeReturns := fake.getLabelsReturns fake.recordInvocation("GetLabels", []interface{}{}) fake.getLabelsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetLabelsStub != nil { + return fake.GetLabelsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getLabelsReturns return fakeReturns.result1 } @@ -841,16 +831,15 @@ func (fake *UpgradeInstance) GetManagedFields() []v1.ManagedFieldsEntry { ret, specificReturn := fake.getManagedFieldsReturnsOnCall[len(fake.getManagedFieldsArgsForCall)] fake.getManagedFieldsArgsForCall = append(fake.getManagedFieldsArgsForCall, struct { }{}) - stub := fake.GetManagedFieldsStub - fakeReturns := fake.getManagedFieldsReturns fake.recordInvocation("GetManagedFields", []interface{}{}) fake.getManagedFieldsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetManagedFieldsStub != nil { + return fake.GetManagedFieldsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getManagedFieldsReturns return fakeReturns.result1 } @@ -894,16 +883,15 @@ func (fake *UpgradeInstance) GetName() string { ret, specificReturn := fake.getNameReturnsOnCall[len(fake.getNameArgsForCall)] fake.getNameArgsForCall = append(fake.getNameArgsForCall, struct { }{}) - stub := fake.GetNameStub - fakeReturns := fake.getNameReturns fake.recordInvocation("GetName", []interface{}{}) fake.getNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNameStub != nil { + return fake.GetNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNameReturns return fakeReturns.result1 } @@ -947,16 +935,15 @@ func (fake *UpgradeInstance) GetNamespace() string { ret, specificReturn := fake.getNamespaceReturnsOnCall[len(fake.getNamespaceArgsForCall)] fake.getNamespaceArgsForCall = append(fake.getNamespaceArgsForCall, struct { }{}) - stub := fake.GetNamespaceStub - fakeReturns := fake.getNamespaceReturns fake.recordInvocation("GetNamespace", []interface{}{}) fake.getNamespaceMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNamespaceStub != nil { + return fake.GetNamespaceStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNamespaceReturns return fakeReturns.result1 } @@ -1000,16 +987,15 @@ func (fake *UpgradeInstance) GetObjectKind() schema.ObjectKind { ret, specificReturn := fake.getObjectKindReturnsOnCall[len(fake.getObjectKindArgsForCall)] fake.getObjectKindArgsForCall = append(fake.getObjectKindArgsForCall, struct { }{}) - stub := fake.GetObjectKindStub - fakeReturns := fake.getObjectKindReturns fake.recordInvocation("GetObjectKind", []interface{}{}) fake.getObjectKindMutex.Unlock() - if stub != nil { - return stub() + if fake.GetObjectKindStub != nil { + return fake.GetObjectKindStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getObjectKindReturns return fakeReturns.result1 } @@ -1053,16 +1039,15 @@ func (fake *UpgradeInstance) GetOwnerReferences() []v1.OwnerReference { ret, specificReturn := fake.getOwnerReferencesReturnsOnCall[len(fake.getOwnerReferencesArgsForCall)] fake.getOwnerReferencesArgsForCall = append(fake.getOwnerReferencesArgsForCall, struct { }{}) - stub := fake.GetOwnerReferencesStub - fakeReturns := fake.getOwnerReferencesReturns fake.recordInvocation("GetOwnerReferences", []interface{}{}) fake.getOwnerReferencesMutex.Unlock() - if stub != nil { - return stub() + if fake.GetOwnerReferencesStub != nil { + return fake.GetOwnerReferencesStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getOwnerReferencesReturns return fakeReturns.result1 } @@ -1106,16 +1091,15 @@ func (fake *UpgradeInstance) GetResourceVersion() string { ret, specificReturn := fake.getResourceVersionReturnsOnCall[len(fake.getResourceVersionArgsForCall)] fake.getResourceVersionArgsForCall = append(fake.getResourceVersionArgsForCall, struct { }{}) - stub := fake.GetResourceVersionStub - fakeReturns := fake.getResourceVersionReturns fake.recordInvocation("GetResourceVersion", []interface{}{}) fake.getResourceVersionMutex.Unlock() - if stub != nil { - return stub() + if fake.GetResourceVersionStub != nil { + return fake.GetResourceVersionStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getResourceVersionReturns return fakeReturns.result1 } @@ -1159,16 +1143,15 @@ func (fake *UpgradeInstance) GetSelfLink() string { ret, specificReturn := fake.getSelfLinkReturnsOnCall[len(fake.getSelfLinkArgsForCall)] fake.getSelfLinkArgsForCall = append(fake.getSelfLinkArgsForCall, struct { }{}) - stub := fake.GetSelfLinkStub - fakeReturns := fake.getSelfLinkReturns fake.recordInvocation("GetSelfLink", []interface{}{}) fake.getSelfLinkMutex.Unlock() - if stub != nil { - return stub() + if fake.GetSelfLinkStub != nil { + return fake.GetSelfLinkStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getSelfLinkReturns return fakeReturns.result1 } @@ -1212,16 +1195,15 @@ func (fake *UpgradeInstance) GetUID() types.UID { ret, specificReturn := fake.getUIDReturnsOnCall[len(fake.getUIDArgsForCall)] fake.getUIDArgsForCall = append(fake.getUIDArgsForCall, struct { }{}) - stub := fake.GetUIDStub - fakeReturns := fake.getUIDReturns fake.recordInvocation("GetUID", []interface{}{}) fake.getUIDMutex.Unlock() - if stub != nil { - return stub() + if fake.GetUIDStub != nil { + return fake.GetUIDStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getUIDReturns return fakeReturns.result1 } @@ -1265,16 +1247,15 @@ func (fake *UpgradeInstance) IsHSMEnabled() bool { ret, specificReturn := fake.isHSMEnabledReturnsOnCall[len(fake.isHSMEnabledArgsForCall)] fake.isHSMEnabledArgsForCall = append(fake.isHSMEnabledArgsForCall, struct { }{}) - stub := fake.IsHSMEnabledStub - fakeReturns := fake.isHSMEnabledReturns fake.recordInvocation("IsHSMEnabled", []interface{}{}) fake.isHSMEnabledMutex.Unlock() - if stub != nil { - return stub() + if fake.IsHSMEnabledStub != nil { + return fake.IsHSMEnabledStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.isHSMEnabledReturns return fakeReturns.result1 } @@ -1318,10 +1299,9 @@ func (fake *UpgradeInstance) SetAnnotations(arg1 map[string]string) { fake.setAnnotationsArgsForCall = append(fake.setAnnotationsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetAnnotationsStub fake.recordInvocation("SetAnnotations", []interface{}{arg1}) fake.setAnnotationsMutex.Unlock() - if stub != nil { + if fake.SetAnnotationsStub != nil { fake.SetAnnotationsStub(arg1) } } @@ -1350,10 +1330,9 @@ func (fake *UpgradeInstance) SetClusterName(arg1 string) { fake.setClusterNameArgsForCall = append(fake.setClusterNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetClusterNameStub fake.recordInvocation("SetClusterName", []interface{}{arg1}) fake.setClusterNameMutex.Unlock() - if stub != nil { + if fake.SetClusterNameStub != nil { fake.SetClusterNameStub(arg1) } } @@ -1382,10 +1361,9 @@ func (fake *UpgradeInstance) SetCreationTimestamp(arg1 v1.Time) { fake.setCreationTimestampArgsForCall = append(fake.setCreationTimestampArgsForCall, struct { arg1 v1.Time }{arg1}) - stub := fake.SetCreationTimestampStub fake.recordInvocation("SetCreationTimestamp", []interface{}{arg1}) fake.setCreationTimestampMutex.Unlock() - if stub != nil { + if fake.SetCreationTimestampStub != nil { fake.SetCreationTimestampStub(arg1) } } @@ -1414,10 +1392,9 @@ func (fake *UpgradeInstance) SetDeletionGracePeriodSeconds(arg1 *int64) { fake.setDeletionGracePeriodSecondsArgsForCall = append(fake.setDeletionGracePeriodSecondsArgsForCall, struct { arg1 *int64 }{arg1}) - stub := fake.SetDeletionGracePeriodSecondsStub fake.recordInvocation("SetDeletionGracePeriodSeconds", []interface{}{arg1}) fake.setDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { + if fake.SetDeletionGracePeriodSecondsStub != nil { fake.SetDeletionGracePeriodSecondsStub(arg1) } } @@ -1446,10 +1423,9 @@ func (fake *UpgradeInstance) SetDeletionTimestamp(arg1 *v1.Time) { fake.setDeletionTimestampArgsForCall = append(fake.setDeletionTimestampArgsForCall, struct { arg1 *v1.Time }{arg1}) - stub := fake.SetDeletionTimestampStub fake.recordInvocation("SetDeletionTimestamp", []interface{}{arg1}) fake.setDeletionTimestampMutex.Unlock() - if stub != nil { + if fake.SetDeletionTimestampStub != nil { fake.SetDeletionTimestampStub(arg1) } } @@ -1483,10 +1459,9 @@ func (fake *UpgradeInstance) SetFinalizers(arg1 []string) { fake.setFinalizersArgsForCall = append(fake.setFinalizersArgsForCall, struct { arg1 []string }{arg1Copy}) - stub := fake.SetFinalizersStub fake.recordInvocation("SetFinalizers", []interface{}{arg1Copy}) fake.setFinalizersMutex.Unlock() - if stub != nil { + if fake.SetFinalizersStub != nil { fake.SetFinalizersStub(arg1) } } @@ -1515,10 +1490,9 @@ func (fake *UpgradeInstance) SetGenerateName(arg1 string) { fake.setGenerateNameArgsForCall = append(fake.setGenerateNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetGenerateNameStub fake.recordInvocation("SetGenerateName", []interface{}{arg1}) fake.setGenerateNameMutex.Unlock() - if stub != nil { + if fake.SetGenerateNameStub != nil { fake.SetGenerateNameStub(arg1) } } @@ -1547,10 +1521,9 @@ func (fake *UpgradeInstance) SetGeneration(arg1 int64) { fake.setGenerationArgsForCall = append(fake.setGenerationArgsForCall, struct { arg1 int64 }{arg1}) - stub := fake.SetGenerationStub fake.recordInvocation("SetGeneration", []interface{}{arg1}) fake.setGenerationMutex.Unlock() - if stub != nil { + if fake.SetGenerationStub != nil { fake.SetGenerationStub(arg1) } } @@ -1579,10 +1552,9 @@ func (fake *UpgradeInstance) SetLabels(arg1 map[string]string) { fake.setLabelsArgsForCall = append(fake.setLabelsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetLabelsStub fake.recordInvocation("SetLabels", []interface{}{arg1}) fake.setLabelsMutex.Unlock() - if stub != nil { + if fake.SetLabelsStub != nil { fake.SetLabelsStub(arg1) } } @@ -1616,10 +1588,9 @@ func (fake *UpgradeInstance) SetManagedFields(arg1 []v1.ManagedFieldsEntry) { fake.setManagedFieldsArgsForCall = append(fake.setManagedFieldsArgsForCall, struct { arg1 []v1.ManagedFieldsEntry }{arg1Copy}) - stub := fake.SetManagedFieldsStub fake.recordInvocation("SetManagedFields", []interface{}{arg1Copy}) fake.setManagedFieldsMutex.Unlock() - if stub != nil { + if fake.SetManagedFieldsStub != nil { fake.SetManagedFieldsStub(arg1) } } @@ -1648,10 +1619,9 @@ func (fake *UpgradeInstance) SetName(arg1 string) { fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNameStub fake.recordInvocation("SetName", []interface{}{arg1}) fake.setNameMutex.Unlock() - if stub != nil { + if fake.SetNameStub != nil { fake.SetNameStub(arg1) } } @@ -1680,10 +1650,9 @@ func (fake *UpgradeInstance) SetNamespace(arg1 string) { fake.setNamespaceArgsForCall = append(fake.setNamespaceArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNamespaceStub fake.recordInvocation("SetNamespace", []interface{}{arg1}) fake.setNamespaceMutex.Unlock() - if stub != nil { + if fake.SetNamespaceStub != nil { fake.SetNamespaceStub(arg1) } } @@ -1717,10 +1686,9 @@ func (fake *UpgradeInstance) SetOwnerReferences(arg1 []v1.OwnerReference) { fake.setOwnerReferencesArgsForCall = append(fake.setOwnerReferencesArgsForCall, struct { arg1 []v1.OwnerReference }{arg1Copy}) - stub := fake.SetOwnerReferencesStub fake.recordInvocation("SetOwnerReferences", []interface{}{arg1Copy}) fake.setOwnerReferencesMutex.Unlock() - if stub != nil { + if fake.SetOwnerReferencesStub != nil { fake.SetOwnerReferencesStub(arg1) } } @@ -1749,10 +1717,9 @@ func (fake *UpgradeInstance) SetResourceVersion(arg1 string) { fake.setResourceVersionArgsForCall = append(fake.setResourceVersionArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetResourceVersionStub fake.recordInvocation("SetResourceVersion", []interface{}{arg1}) fake.setResourceVersionMutex.Unlock() - if stub != nil { + if fake.SetResourceVersionStub != nil { fake.SetResourceVersionStub(arg1) } } @@ -1781,10 +1748,9 @@ func (fake *UpgradeInstance) SetSelfLink(arg1 string) { fake.setSelfLinkArgsForCall = append(fake.setSelfLinkArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetSelfLinkStub fake.recordInvocation("SetSelfLink", []interface{}{arg1}) fake.setSelfLinkMutex.Unlock() - if stub != nil { + if fake.SetSelfLinkStub != nil { fake.SetSelfLinkStub(arg1) } } @@ -1813,10 +1779,9 @@ func (fake *UpgradeInstance) SetUID(arg1 types.UID) { fake.setUIDArgsForCall = append(fake.setUIDArgsForCall, struct { arg1 types.UID }{arg1}) - stub := fake.SetUIDStub fake.recordInvocation("SetUID", []interface{}{arg1}) fake.setUIDMutex.Unlock() - if stub != nil { + if fake.SetUIDStub != nil { fake.SetUIDStub(arg1) } } @@ -1845,16 +1810,15 @@ func (fake *UpgradeInstance) UsingCouchDB() bool { ret, specificReturn := fake.usingCouchDBReturnsOnCall[len(fake.usingCouchDBArgsForCall)] fake.usingCouchDBArgsForCall = append(fake.usingCouchDBArgsForCall, struct { }{}) - stub := fake.UsingCouchDBStub - fakeReturns := fake.usingCouchDBReturns fake.recordInvocation("UsingCouchDB", []interface{}{}) fake.usingCouchDBMutex.Unlock() - if stub != nil { - return stub() + if fake.UsingCouchDBStub != nil { + return fake.UsingCouchDBStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.usingCouchDBReturns return fakeReturns.result1 } @@ -1898,16 +1862,15 @@ func (fake *UpgradeInstance) UsingHSMProxy() bool { ret, specificReturn := fake.usingHSMProxyReturnsOnCall[len(fake.usingHSMProxyArgsForCall)] fake.usingHSMProxyArgsForCall = append(fake.usingHSMProxyArgsForCall, struct { }{}) - stub := fake.UsingHSMProxyStub - fakeReturns := fake.usingHSMProxyReturns fake.recordInvocation("UsingHSMProxy", []interface{}{}) fake.usingHSMProxyMutex.Unlock() - if stub != nil { - return stub() + if fake.UsingHSMProxyStub != nil { + return fake.UsingHSMProxyStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.usingHSMProxyReturns return fakeReturns.result1 } diff --git a/pkg/apis/deployer/deployer.go b/pkg/apis/deployer/deployer.go index e6f3577a..242237d1 100644 --- a/pkg/apis/deployer/deployer.go +++ b/pkg/apis/deployer/deployer.go @@ -127,15 +127,6 @@ type PeerImages struct { // PeerDigest is the digest tag of the peer image PeerDigest string `json:"peerDigest,omitempty"` - // DindImage is the name of the dind image - DindImage string `json:"dindImage,omitempty"` - - // DindTag is the tag of the dind image - DindTag string `json:"dindTag,omitempty"` - - // DindDigest is the digest tag of the dind image - DindDigest string `json:"dindDigest,omitempty"` - // GRPCWebImage is the name of the grpc web proxy image GRPCWebImage string `json:"grpcwebImage,omitempty"` @@ -468,7 +459,6 @@ func (i *PeerImages) Override(requested *PeerImages, registryURL string, arch st i.PeerInitImage = image.GetImage(registryURL, i.PeerInitImage, requested.PeerInitImage) i.PeerImage = image.GetImage(registryURL, i.PeerImage, requested.PeerImage) i.CouchDBImage = image.GetImage(registryURL, i.CouchDBImage, requested.CouchDBImage) - i.DindImage = image.GetImage(registryURL, i.DindImage, requested.DindImage) i.GRPCWebImage = image.GetImage(registryURL, i.GRPCWebImage, requested.GRPCWebImage) i.CCLauncherImage = image.GetImage(registryURL, i.CCLauncherImage, requested.CCLauncherImage) i.FileTransferImage = image.GetImage(registryURL, i.FileTransferImage, requested.FileTransferImage) @@ -483,7 +473,6 @@ func (i *PeerImages) Override(requested *PeerImages, registryURL string, arch st i.PeerInitTag = image.GetTag(arch, i.PeerInitTag, requested.PeerInitTag) i.PeerTag = image.GetTag(arch, i.PeerTag, requested.PeerTag) i.CouchDBTag = image.GetTag(arch, i.CouchDBTag, requested.CouchDBTag) - i.DindTag = image.GetTag(arch, i.DindTag, requested.DindTag) i.GRPCWebTag = image.GetTag(arch, i.GRPCWebTag, requested.GRPCWebTag) i.CCLauncherTag = image.GetTag(arch, i.CCLauncherTag, requested.CCLauncherTag) i.FileTransferTag = image.GetTag(arch, i.FileTransferTag, requested.FileTransferTag) @@ -498,7 +487,6 @@ func (i *PeerImages) Override(requested *PeerImages, registryURL string, arch st i.PeerInitDigest = image.GetTag(arch, i.PeerInitDigest, requested.PeerInitDigest) i.PeerDigest = image.GetTag(arch, i.PeerDigest, requested.PeerDigest) i.CouchDBDigest = image.GetTag(arch, i.CouchDBDigest, requested.CouchDBDigest) - i.DindDigest = image.GetTag(arch, i.DindDigest, requested.DindDigest) i.GRPCWebDigest = image.GetTag(arch, i.GRPCWebDigest, requested.GRPCWebDigest) i.CCLauncherDigest = image.GetTag(arch, i.CCLauncherDigest, requested.CCLauncherDigest) i.FileTransferDigest = image.GetTag(arch, i.FileTransferDigest, requested.FileTransferDigest) diff --git a/pkg/certificate/mocks/reenroller.go b/pkg/certificate/mocks/reenroller.go index 2c4c66c2..e895ca48 100644 --- a/pkg/certificate/mocks/reenroller.go +++ b/pkg/certificate/mocks/reenroller.go @@ -30,16 +30,15 @@ func (fake *Reenroller) Reenroll() (*config.Response, error) { ret, specificReturn := fake.reenrollReturnsOnCall[len(fake.reenrollArgsForCall)] fake.reenrollArgsForCall = append(fake.reenrollArgsForCall, struct { }{}) - stub := fake.ReenrollStub - fakeReturns := fake.reenrollReturns fake.recordInvocation("Reenroll", []interface{}{}) fake.reenrollMutex.Unlock() - if stub != nil { - return stub() + if fake.ReenrollStub != nil { + return fake.ReenrollStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.reenrollReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/pkg/certificate/reenroller/mocks/identity.go b/pkg/certificate/reenroller/mocks/identity.go index 4366e9c4..06b2d86a 100644 --- a/pkg/certificate/reenroller/mocks/identity.go +++ b/pkg/certificate/reenroller/mocks/identity.go @@ -53,16 +53,15 @@ func (fake *Identity) GetClient() *lib.Client { ret, specificReturn := fake.getClientReturnsOnCall[len(fake.getClientArgsForCall)] fake.getClientArgsForCall = append(fake.getClientArgsForCall, struct { }{}) - stub := fake.GetClientStub - fakeReturns := fake.getClientReturns fake.recordInvocation("GetClient", []interface{}{}) fake.getClientMutex.Unlock() - if stub != nil { - return stub() + if fake.GetClientStub != nil { + return fake.GetClientStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getClientReturns return fakeReturns.result1 } @@ -106,16 +105,15 @@ func (fake *Identity) GetECert() *x509.Signer { ret, specificReturn := fake.getECertReturnsOnCall[len(fake.getECertArgsForCall)] fake.getECertArgsForCall = append(fake.getECertArgsForCall, struct { }{}) - stub := fake.GetECertStub - fakeReturns := fake.getECertReturns fake.recordInvocation("GetECert", []interface{}{}) fake.getECertMutex.Unlock() - if stub != nil { - return stub() + if fake.GetECertStub != nil { + return fake.GetECertStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getECertReturns return fakeReturns.result1 } @@ -160,16 +158,15 @@ func (fake *Identity) Reenroll(arg1 *api.ReenrollmentRequest) (*lib.EnrollmentRe fake.reenrollArgsForCall = append(fake.reenrollArgsForCall, struct { arg1 *api.ReenrollmentRequest }{arg1}) - stub := fake.ReenrollStub - fakeReturns := fake.reenrollReturns fake.recordInvocation("Reenroll", []interface{}{arg1}) fake.reenrollMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ReenrollStub != nil { + return fake.ReenrollStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.reenrollReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/pkg/command/mocks/reader.go b/pkg/command/mocks/reader.go index b1bb1d0c..a764da5c 100644 --- a/pkg/command/mocks/reader.go +++ b/pkg/command/mocks/reader.go @@ -49,16 +49,15 @@ func (fake *Reader) Get(arg1 context.Context, arg2 types.NamespacedName, arg3 cl arg2 types.NamespacedName arg3 client.Object }{arg1, arg2, arg3}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1, arg2, arg3}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GetStub != nil { + return fake.GetStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.getReturns return fakeReturns.result1 } @@ -112,16 +111,15 @@ func (fake *Reader) List(arg1 context.Context, arg2 client.ObjectList, arg3 ...c arg2 client.ObjectList arg3 []client.ListOption }{arg1, arg2, arg3}) - stub := fake.ListStub - fakeReturns := fake.listReturns fake.recordInvocation("List", []interface{}{arg1, arg2, arg3}) fake.listMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.ListStub != nil { + return fake.ListStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.listReturns return fakeReturns.result1 } diff --git a/pkg/controller/mocks/client.go b/pkg/controller/mocks/client.go index ee14505d..d028b255 100644 --- a/pkg/controller/mocks/client.go +++ b/pkg/controller/mocks/client.go @@ -142,16 +142,15 @@ func (fake *Client) Create(arg1 context.Context, arg2 client.Object, arg3 ...con arg2 client.Object arg3 []controllerclient.CreateOption }{arg1, arg2, arg3}) - stub := fake.CreateStub - fakeReturns := fake.createReturns fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3}) fake.createMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.CreateStub != nil { + return fake.CreateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.createReturns return fakeReturns.result1 } @@ -205,16 +204,15 @@ func (fake *Client) CreateOrUpdate(arg1 context.Context, arg2 client.Object, arg arg2 client.Object arg3 []controllerclient.CreateOrUpdateOption }{arg1, arg2, arg3}) - stub := fake.CreateOrUpdateStub - fakeReturns := fake.createOrUpdateReturns fake.recordInvocation("CreateOrUpdate", []interface{}{arg1, arg2, arg3}) fake.createOrUpdateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.CreateOrUpdateStub != nil { + return fake.CreateOrUpdateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.createOrUpdateReturns return fakeReturns.result1 } @@ -268,16 +266,15 @@ func (fake *Client) Delete(arg1 context.Context, arg2 client.Object, arg3 ...cli arg2 client.Object arg3 []client.DeleteOption }{arg1, arg2, arg3}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1, arg2, arg3}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -331,16 +328,15 @@ func (fake *Client) Get(arg1 context.Context, arg2 types.NamespacedName, arg3 cl arg2 types.NamespacedName arg3 client.Object }{arg1, arg2, arg3}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1, arg2, arg3}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GetStub != nil { + return fake.GetStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.getReturns return fakeReturns.result1 } @@ -394,16 +390,15 @@ func (fake *Client) List(arg1 context.Context, arg2 client.ObjectList, arg3 ...c arg2 client.ObjectList arg3 []client.ListOption }{arg1, arg2, arg3}) - stub := fake.ListStub - fakeReturns := fake.listReturns fake.recordInvocation("List", []interface{}{arg1, arg2, arg3}) fake.listMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.ListStub != nil { + return fake.ListStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.listReturns return fakeReturns.result1 } @@ -458,16 +453,15 @@ func (fake *Client) Patch(arg1 context.Context, arg2 client.Object, arg3 client. arg3 client.Patch arg4 []controllerclient.PatchOption }{arg1, arg2, arg3, arg4}) - stub := fake.PatchStub - fakeReturns := fake.patchReturns fake.recordInvocation("Patch", []interface{}{arg1, arg2, arg3, arg4}) fake.patchMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) + if fake.PatchStub != nil { + return fake.PatchStub(arg1, arg2, arg3, arg4...) } if specificReturn { return ret.result1 } + fakeReturns := fake.patchReturns return fakeReturns.result1 } @@ -522,16 +516,15 @@ func (fake *Client) PatchStatus(arg1 context.Context, arg2 client.Object, arg3 c arg3 client.Patch arg4 []controllerclient.PatchOption }{arg1, arg2, arg3, arg4}) - stub := fake.PatchStatusStub - fakeReturns := fake.patchStatusReturns fake.recordInvocation("PatchStatus", []interface{}{arg1, arg2, arg3, arg4}) fake.patchStatusMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) + if fake.PatchStatusStub != nil { + return fake.PatchStatusStub(arg1, arg2, arg3, arg4...) } if specificReturn { return ret.result1 } + fakeReturns := fake.patchStatusReturns return fakeReturns.result1 } @@ -585,16 +578,15 @@ func (fake *Client) Update(arg1 context.Context, arg2 client.Object, arg3 ...con arg2 client.Object arg3 []controllerclient.UpdateOption }{arg1, arg2, arg3}) - stub := fake.UpdateStub - fakeReturns := fake.updateReturns fake.recordInvocation("Update", []interface{}{arg1, arg2, arg3}) fake.updateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.UpdateStub != nil { + return fake.UpdateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateReturns return fakeReturns.result1 } @@ -648,16 +640,15 @@ func (fake *Client) UpdateStatus(arg1 context.Context, arg2 client.Object, arg3 arg2 client.Object arg3 []client.UpdateOption }{arg1, arg2, arg3}) - stub := fake.UpdateStatusStub - fakeReturns := fake.updateStatusReturns fake.recordInvocation("UpdateStatus", []interface{}{arg1, arg2, arg3}) fake.updateStatusMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.UpdateStatusStub != nil { + return fake.UpdateStatusStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateStatusReturns return fakeReturns.result1 } diff --git a/pkg/crd/mocks/client.go b/pkg/crd/mocks/client.go index c540a370..02b7a3de 100644 --- a/pkg/crd/mocks/client.go +++ b/pkg/crd/mocks/client.go @@ -32,16 +32,15 @@ func (fake *Client) CreateCRD(arg1 *v1.CustomResourceDefinition) (*v1.CustomReso fake.createCRDArgsForCall = append(fake.createCRDArgsForCall, struct { arg1 *v1.CustomResourceDefinition }{arg1}) - stub := fake.CreateCRDStub - fakeReturns := fake.createCRDReturns fake.recordInvocation("CreateCRD", []interface{}{arg1}) fake.createCRDMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.CreateCRDStub != nil { + return fake.CreateCRDStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.createCRDReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/pkg/initializer/ca/mocks/client.go b/pkg/initializer/ca/mocks/client.go index ee14505d..d028b255 100644 --- a/pkg/initializer/ca/mocks/client.go +++ b/pkg/initializer/ca/mocks/client.go @@ -142,16 +142,15 @@ func (fake *Client) Create(arg1 context.Context, arg2 client.Object, arg3 ...con arg2 client.Object arg3 []controllerclient.CreateOption }{arg1, arg2, arg3}) - stub := fake.CreateStub - fakeReturns := fake.createReturns fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3}) fake.createMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.CreateStub != nil { + return fake.CreateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.createReturns return fakeReturns.result1 } @@ -205,16 +204,15 @@ func (fake *Client) CreateOrUpdate(arg1 context.Context, arg2 client.Object, arg arg2 client.Object arg3 []controllerclient.CreateOrUpdateOption }{arg1, arg2, arg3}) - stub := fake.CreateOrUpdateStub - fakeReturns := fake.createOrUpdateReturns fake.recordInvocation("CreateOrUpdate", []interface{}{arg1, arg2, arg3}) fake.createOrUpdateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.CreateOrUpdateStub != nil { + return fake.CreateOrUpdateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.createOrUpdateReturns return fakeReturns.result1 } @@ -268,16 +266,15 @@ func (fake *Client) Delete(arg1 context.Context, arg2 client.Object, arg3 ...cli arg2 client.Object arg3 []client.DeleteOption }{arg1, arg2, arg3}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1, arg2, arg3}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -331,16 +328,15 @@ func (fake *Client) Get(arg1 context.Context, arg2 types.NamespacedName, arg3 cl arg2 types.NamespacedName arg3 client.Object }{arg1, arg2, arg3}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1, arg2, arg3}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GetStub != nil { + return fake.GetStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.getReturns return fakeReturns.result1 } @@ -394,16 +390,15 @@ func (fake *Client) List(arg1 context.Context, arg2 client.ObjectList, arg3 ...c arg2 client.ObjectList arg3 []client.ListOption }{arg1, arg2, arg3}) - stub := fake.ListStub - fakeReturns := fake.listReturns fake.recordInvocation("List", []interface{}{arg1, arg2, arg3}) fake.listMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.ListStub != nil { + return fake.ListStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.listReturns return fakeReturns.result1 } @@ -458,16 +453,15 @@ func (fake *Client) Patch(arg1 context.Context, arg2 client.Object, arg3 client. arg3 client.Patch arg4 []controllerclient.PatchOption }{arg1, arg2, arg3, arg4}) - stub := fake.PatchStub - fakeReturns := fake.patchReturns fake.recordInvocation("Patch", []interface{}{arg1, arg2, arg3, arg4}) fake.patchMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) + if fake.PatchStub != nil { + return fake.PatchStub(arg1, arg2, arg3, arg4...) } if specificReturn { return ret.result1 } + fakeReturns := fake.patchReturns return fakeReturns.result1 } @@ -522,16 +516,15 @@ func (fake *Client) PatchStatus(arg1 context.Context, arg2 client.Object, arg3 c arg3 client.Patch arg4 []controllerclient.PatchOption }{arg1, arg2, arg3, arg4}) - stub := fake.PatchStatusStub - fakeReturns := fake.patchStatusReturns fake.recordInvocation("PatchStatus", []interface{}{arg1, arg2, arg3, arg4}) fake.patchStatusMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) + if fake.PatchStatusStub != nil { + return fake.PatchStatusStub(arg1, arg2, arg3, arg4...) } if specificReturn { return ret.result1 } + fakeReturns := fake.patchStatusReturns return fakeReturns.result1 } @@ -585,16 +578,15 @@ func (fake *Client) Update(arg1 context.Context, arg2 client.Object, arg3 ...con arg2 client.Object arg3 []controllerclient.UpdateOption }{arg1, arg2, arg3}) - stub := fake.UpdateStub - fakeReturns := fake.updateReturns fake.recordInvocation("Update", []interface{}{arg1, arg2, arg3}) fake.updateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.UpdateStub != nil { + return fake.UpdateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateReturns return fakeReturns.result1 } @@ -648,16 +640,15 @@ func (fake *Client) UpdateStatus(arg1 context.Context, arg2 client.Object, arg3 arg2 client.Object arg3 []client.UpdateOption }{arg1, arg2, arg3}) - stub := fake.UpdateStatusStub - fakeReturns := fake.updateStatusReturns fake.recordInvocation("UpdateStatus", []interface{}{arg1, arg2, arg3}) fake.updateStatusMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.UpdateStatusStub != nil { + return fake.UpdateStatusStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateStatusReturns return fakeReturns.result1 } diff --git a/pkg/initializer/ca/mocks/config.go b/pkg/initializer/ca/mocks/config.go index 21138015..4ae5739d 100644 --- a/pkg/initializer/ca/mocks/config.go +++ b/pkg/initializer/ca/mocks/config.go @@ -124,16 +124,15 @@ func (fake *CAConfig) GetHomeDir() string { ret, specificReturn := fake.getHomeDirReturnsOnCall[len(fake.getHomeDirArgsForCall)] fake.getHomeDirArgsForCall = append(fake.getHomeDirArgsForCall, struct { }{}) - stub := fake.GetHomeDirStub - fakeReturns := fake.getHomeDirReturns fake.recordInvocation("GetHomeDir", []interface{}{}) fake.getHomeDirMutex.Unlock() - if stub != nil { - return stub() + if fake.GetHomeDirStub != nil { + return fake.GetHomeDirStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getHomeDirReturns return fakeReturns.result1 } @@ -177,16 +176,15 @@ func (fake *CAConfig) GetServerConfig() *v1.ServerConfig { ret, specificReturn := fake.getServerConfigReturnsOnCall[len(fake.getServerConfigArgsForCall)] fake.getServerConfigArgsForCall = append(fake.getServerConfigArgsForCall, struct { }{}) - stub := fake.GetServerConfigStub - fakeReturns := fake.getServerConfigReturns fake.recordInvocation("GetServerConfig", []interface{}{}) fake.getServerConfigMutex.Unlock() - if stub != nil { - return stub() + if fake.GetServerConfigStub != nil { + return fake.GetServerConfigStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getServerConfigReturns return fakeReturns.result1 } @@ -230,16 +228,15 @@ func (fake *CAConfig) ParseCABlock() (map[string][]byte, error) { ret, specificReturn := fake.parseCABlockReturnsOnCall[len(fake.parseCABlockArgsForCall)] fake.parseCABlockArgsForCall = append(fake.parseCABlockArgsForCall, struct { }{}) - stub := fake.ParseCABlockStub - fakeReturns := fake.parseCABlockReturns fake.recordInvocation("ParseCABlock", []interface{}{}) fake.parseCABlockMutex.Unlock() - if stub != nil { - return stub() + if fake.ParseCABlockStub != nil { + return fake.ParseCABlockStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.parseCABlockReturns return fakeReturns.result1, fakeReturns.result2 } @@ -286,16 +283,15 @@ func (fake *CAConfig) ParseDBBlock() (map[string][]byte, error) { ret, specificReturn := fake.parseDBBlockReturnsOnCall[len(fake.parseDBBlockArgsForCall)] fake.parseDBBlockArgsForCall = append(fake.parseDBBlockArgsForCall, struct { }{}) - stub := fake.ParseDBBlockStub - fakeReturns := fake.parseDBBlockReturns fake.recordInvocation("ParseDBBlock", []interface{}{}) fake.parseDBBlockMutex.Unlock() - if stub != nil { - return stub() + if fake.ParseDBBlockStub != nil { + return fake.ParseDBBlockStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.parseDBBlockReturns return fakeReturns.result1, fakeReturns.result2 } @@ -342,16 +338,15 @@ func (fake *CAConfig) ParseIntermediateBlock() (map[string][]byte, error) { ret, specificReturn := fake.parseIntermediateBlockReturnsOnCall[len(fake.parseIntermediateBlockArgsForCall)] fake.parseIntermediateBlockArgsForCall = append(fake.parseIntermediateBlockArgsForCall, struct { }{}) - stub := fake.ParseIntermediateBlockStub - fakeReturns := fake.parseIntermediateBlockReturns fake.recordInvocation("ParseIntermediateBlock", []interface{}{}) fake.parseIntermediateBlockMutex.Unlock() - if stub != nil { - return stub() + if fake.ParseIntermediateBlockStub != nil { + return fake.ParseIntermediateBlockStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.parseIntermediateBlockReturns return fakeReturns.result1, fakeReturns.result2 } @@ -398,16 +393,15 @@ func (fake *CAConfig) ParseOperationsBlock() (map[string][]byte, error) { ret, specificReturn := fake.parseOperationsBlockReturnsOnCall[len(fake.parseOperationsBlockArgsForCall)] fake.parseOperationsBlockArgsForCall = append(fake.parseOperationsBlockArgsForCall, struct { }{}) - stub := fake.ParseOperationsBlockStub - fakeReturns := fake.parseOperationsBlockReturns fake.recordInvocation("ParseOperationsBlock", []interface{}{}) fake.parseOperationsBlockMutex.Unlock() - if stub != nil { - return stub() + if fake.ParseOperationsBlockStub != nil { + return fake.ParseOperationsBlockStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.parseOperationsBlockReturns return fakeReturns.result1, fakeReturns.result2 } @@ -454,16 +448,15 @@ func (fake *CAConfig) ParseTLSBlock() (map[string][]byte, error) { ret, specificReturn := fake.parseTLSBlockReturnsOnCall[len(fake.parseTLSBlockArgsForCall)] fake.parseTLSBlockArgsForCall = append(fake.parseTLSBlockArgsForCall, struct { }{}) - stub := fake.ParseTLSBlockStub - fakeReturns := fake.parseTLSBlockReturns fake.recordInvocation("ParseTLSBlock", []interface{}{}) fake.parseTLSBlockMutex.Unlock() - if stub != nil { - return stub() + if fake.ParseTLSBlockStub != nil { + return fake.ParseTLSBlockStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.parseTLSBlockReturns return fakeReturns.result1, fakeReturns.result2 } @@ -510,10 +503,9 @@ func (fake *CAConfig) SetMountPaths(arg1 config.Type) { fake.setMountPathsArgsForCall = append(fake.setMountPathsArgsForCall, struct { arg1 config.Type }{arg1}) - stub := fake.SetMountPathsStub fake.recordInvocation("SetMountPaths", []interface{}{arg1}) fake.setMountPathsMutex.Unlock() - if stub != nil { + if fake.SetMountPathsStub != nil { fake.SetMountPathsStub(arg1) } } @@ -542,10 +534,9 @@ func (fake *CAConfig) SetServerConfig(arg1 *v1.ServerConfig) { fake.setServerConfigArgsForCall = append(fake.setServerConfigArgsForCall, struct { arg1 *v1.ServerConfig }{arg1}) - stub := fake.SetServerConfigStub fake.recordInvocation("SetServerConfig", []interface{}{arg1}) fake.setServerConfigMutex.Unlock() - if stub != nil { + if fake.SetServerConfigStub != nil { fake.SetServerConfigStub(arg1) } } @@ -574,10 +565,9 @@ func (fake *CAConfig) SetUpdate(arg1 bool) { fake.setUpdateArgsForCall = append(fake.setUpdateArgsForCall, struct { arg1 bool }{arg1}) - stub := fake.SetUpdateStub fake.recordInvocation("SetUpdate", []interface{}{arg1}) fake.setUpdateMutex.Unlock() - if stub != nil { + if fake.SetUpdateStub != nil { fake.SetUpdateStub(arg1) } } @@ -606,16 +596,15 @@ func (fake *CAConfig) UsingPKCS11() bool { ret, specificReturn := fake.usingPKCS11ReturnsOnCall[len(fake.usingPKCS11ArgsForCall)] fake.usingPKCS11ArgsForCall = append(fake.usingPKCS11ArgsForCall, struct { }{}) - stub := fake.UsingPKCS11Stub - fakeReturns := fake.usingPKCS11Returns fake.recordInvocation("UsingPKCS11", []interface{}{}) fake.usingPKCS11Mutex.Unlock() - if stub != nil { - return stub() + if fake.UsingPKCS11Stub != nil { + return fake.UsingPKCS11Stub() } if specificReturn { return ret.result1 } + fakeReturns := fake.usingPKCS11Returns return fakeReturns.result1 } diff --git a/pkg/initializer/ca/mocks/ibpca.go b/pkg/initializer/ca/mocks/ibpca.go index b010ab59..1c9a7d5e 100644 --- a/pkg/initializer/ca/mocks/ibpca.go +++ b/pkg/initializer/ca/mocks/ibpca.go @@ -148,16 +148,15 @@ func (fake *IBPCA) ConfigToBytes() ([]byte, error) { ret, specificReturn := fake.configToBytesReturnsOnCall[len(fake.configToBytesArgsForCall)] fake.configToBytesArgsForCall = append(fake.configToBytesArgsForCall, struct { }{}) - stub := fake.ConfigToBytesStub - fakeReturns := fake.configToBytesReturns fake.recordInvocation("ConfigToBytes", []interface{}{}) fake.configToBytesMutex.Unlock() - if stub != nil { - return stub() + if fake.ConfigToBytesStub != nil { + return fake.ConfigToBytesStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.configToBytesReturns return fakeReturns.result1, fakeReturns.result2 } @@ -204,16 +203,15 @@ func (fake *IBPCA) GetHomeDir() string { ret, specificReturn := fake.getHomeDirReturnsOnCall[len(fake.getHomeDirArgsForCall)] fake.getHomeDirArgsForCall = append(fake.getHomeDirArgsForCall, struct { }{}) - stub := fake.GetHomeDirStub - fakeReturns := fake.getHomeDirReturns fake.recordInvocation("GetHomeDir", []interface{}{}) fake.getHomeDirMutex.Unlock() - if stub != nil { - return stub() + if fake.GetHomeDirStub != nil { + return fake.GetHomeDirStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getHomeDirReturns return fakeReturns.result1 } @@ -257,16 +255,15 @@ func (fake *IBPCA) GetServerConfig() *v1.ServerConfig { ret, specificReturn := fake.getServerConfigReturnsOnCall[len(fake.getServerConfigArgsForCall)] fake.getServerConfigArgsForCall = append(fake.getServerConfigArgsForCall, struct { }{}) - stub := fake.GetServerConfigStub - fakeReturns := fake.getServerConfigReturns fake.recordInvocation("GetServerConfig", []interface{}{}) fake.getServerConfigMutex.Unlock() - if stub != nil { - return stub() + if fake.GetServerConfigStub != nil { + return fake.GetServerConfigStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getServerConfigReturns return fakeReturns.result1 } @@ -310,16 +307,15 @@ func (fake *IBPCA) GetType() config.Type { ret, specificReturn := fake.getTypeReturnsOnCall[len(fake.getTypeArgsForCall)] fake.getTypeArgsForCall = append(fake.getTypeArgsForCall, struct { }{}) - stub := fake.GetTypeStub - fakeReturns := fake.getTypeReturns fake.recordInvocation("GetType", []interface{}{}) fake.getTypeMutex.Unlock() - if stub != nil { - return stub() + if fake.GetTypeStub != nil { + return fake.GetTypeStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getTypeReturns return fakeReturns.result1 } @@ -363,16 +359,15 @@ func (fake *IBPCA) Init() error { ret, specificReturn := fake.initReturnsOnCall[len(fake.initArgsForCall)] fake.initArgsForCall = append(fake.initArgsForCall, struct { }{}) - stub := fake.InitStub - fakeReturns := fake.initReturns fake.recordInvocation("Init", []interface{}{}) fake.initMutex.Unlock() - if stub != nil { - return stub() + if fake.InitStub != nil { + return fake.InitStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.initReturns return fakeReturns.result1 } @@ -415,10 +410,9 @@ func (fake *IBPCA) IsBeingUpdated() { fake.isBeingUpdatedMutex.Lock() fake.isBeingUpdatedArgsForCall = append(fake.isBeingUpdatedArgsForCall, struct { }{}) - stub := fake.IsBeingUpdatedStub fake.recordInvocation("IsBeingUpdated", []interface{}{}) fake.isBeingUpdatedMutex.Unlock() - if stub != nil { + if fake.IsBeingUpdatedStub != nil { fake.IsBeingUpdatedStub() } } @@ -441,16 +435,15 @@ func (fake *IBPCA) OverrideServerConfig(arg1 *v1.ServerConfig) error { fake.overrideServerConfigArgsForCall = append(fake.overrideServerConfigArgsForCall, struct { arg1 *v1.ServerConfig }{arg1}) - stub := fake.OverrideServerConfigStub - fakeReturns := fake.overrideServerConfigReturns fake.recordInvocation("OverrideServerConfig", []interface{}{arg1}) fake.overrideServerConfigMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.OverrideServerConfigStub != nil { + return fake.OverrideServerConfigStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.overrideServerConfigReturns return fakeReturns.result1 } @@ -501,16 +494,15 @@ func (fake *IBPCA) ParseCABlock() (map[string][]byte, error) { ret, specificReturn := fake.parseCABlockReturnsOnCall[len(fake.parseCABlockArgsForCall)] fake.parseCABlockArgsForCall = append(fake.parseCABlockArgsForCall, struct { }{}) - stub := fake.ParseCABlockStub - fakeReturns := fake.parseCABlockReturns fake.recordInvocation("ParseCABlock", []interface{}{}) fake.parseCABlockMutex.Unlock() - if stub != nil { - return stub() + if fake.ParseCABlockStub != nil { + return fake.ParseCABlockStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.parseCABlockReturns return fakeReturns.result1, fakeReturns.result2 } @@ -557,16 +549,15 @@ func (fake *IBPCA) ParseCrypto() (map[string][]byte, error) { ret, specificReturn := fake.parseCryptoReturnsOnCall[len(fake.parseCryptoArgsForCall)] fake.parseCryptoArgsForCall = append(fake.parseCryptoArgsForCall, struct { }{}) - stub := fake.ParseCryptoStub - fakeReturns := fake.parseCryptoReturns fake.recordInvocation("ParseCrypto", []interface{}{}) fake.parseCryptoMutex.Unlock() - if stub != nil { - return stub() + if fake.ParseCryptoStub != nil { + return fake.ParseCryptoStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.parseCryptoReturns return fakeReturns.result1, fakeReturns.result2 } @@ -613,16 +604,15 @@ func (fake *IBPCA) RemoveHomeDir() error { ret, specificReturn := fake.removeHomeDirReturnsOnCall[len(fake.removeHomeDirArgsForCall)] fake.removeHomeDirArgsForCall = append(fake.removeHomeDirArgsForCall, struct { }{}) - stub := fake.RemoveHomeDirStub - fakeReturns := fake.removeHomeDirReturns fake.recordInvocation("RemoveHomeDir", []interface{}{}) fake.removeHomeDirMutex.Unlock() - if stub != nil { - return stub() + if fake.RemoveHomeDirStub != nil { + return fake.RemoveHomeDirStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.removeHomeDirReturns return fakeReturns.result1 } @@ -665,10 +655,9 @@ func (fake *IBPCA) SetMountPaths() { fake.setMountPathsMutex.Lock() fake.setMountPathsArgsForCall = append(fake.setMountPathsArgsForCall, struct { }{}) - stub := fake.SetMountPathsStub fake.recordInvocation("SetMountPaths", []interface{}{}) fake.setMountPathsMutex.Unlock() - if stub != nil { + if fake.SetMountPathsStub != nil { fake.SetMountPathsStub() } } @@ -691,16 +680,15 @@ func (fake *IBPCA) ViperUnmarshal(arg1 string) (*lib.ServerConfig, error) { fake.viperUnmarshalArgsForCall = append(fake.viperUnmarshalArgsForCall, struct { arg1 string }{arg1}) - stub := fake.ViperUnmarshalStub - fakeReturns := fake.viperUnmarshalReturns fake.recordInvocation("ViperUnmarshal", []interface{}{arg1}) fake.viperUnmarshalMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ViperUnmarshalStub != nil { + return fake.ViperUnmarshalStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.viperUnmarshalReturns return fakeReturns.result1, fakeReturns.result2 } @@ -754,16 +742,15 @@ func (fake *IBPCA) WriteConfig() error { ret, specificReturn := fake.writeConfigReturnsOnCall[len(fake.writeConfigArgsForCall)] fake.writeConfigArgsForCall = append(fake.writeConfigArgsForCall, struct { }{}) - stub := fake.WriteConfigStub - fakeReturns := fake.writeConfigReturns fake.recordInvocation("WriteConfig", []interface{}{}) fake.writeConfigMutex.Unlock() - if stub != nil { - return stub() + if fake.WriteConfigStub != nil { + return fake.WriteConfigStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.writeConfigReturns return fakeReturns.result1 } diff --git a/pkg/initializer/common/config/mocks/crypto.go b/pkg/initializer/common/config/mocks/crypto.go index f0e99df7..b2dcad34 100644 --- a/pkg/initializer/common/config/mocks/crypto.go +++ b/pkg/initializer/common/config/mocks/crypto.go @@ -49,16 +49,15 @@ func (fake *Crypto) GetCrypto() (*config.Response, error) { ret, specificReturn := fake.getCryptoReturnsOnCall[len(fake.getCryptoArgsForCall)] fake.getCryptoArgsForCall = append(fake.getCryptoArgsForCall, struct { }{}) - stub := fake.GetCryptoStub - fakeReturns := fake.getCryptoReturns fake.recordInvocation("GetCrypto", []interface{}{}) fake.getCryptoMutex.Unlock() - if stub != nil { - return stub() + if fake.GetCryptoStub != nil { + return fake.GetCryptoStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getCryptoReturns return fakeReturns.result1, fakeReturns.result2 } @@ -105,16 +104,15 @@ func (fake *Crypto) PingCA() error { ret, specificReturn := fake.pingCAReturnsOnCall[len(fake.pingCAArgsForCall)] fake.pingCAArgsForCall = append(fake.pingCAArgsForCall, struct { }{}) - stub := fake.PingCAStub - fakeReturns := fake.pingCAReturns fake.recordInvocation("PingCA", []interface{}{}) fake.pingCAMutex.Unlock() - if stub != nil { - return stub() + if fake.PingCAStub != nil { + return fake.PingCAStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.pingCAReturns return fakeReturns.result1 } @@ -158,16 +156,15 @@ func (fake *Crypto) Validate() error { ret, specificReturn := fake.validateReturnsOnCall[len(fake.validateArgsForCall)] fake.validateArgsForCall = append(fake.validateArgsForCall, struct { }{}) - stub := fake.ValidateStub - fakeReturns := fake.validateReturns fake.recordInvocation("Validate", []interface{}{}) fake.validateMutex.Unlock() - if stub != nil { - return stub() + if fake.ValidateStub != nil { + return fake.ValidateStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.validateReturns return fakeReturns.result1 } diff --git a/pkg/initializer/common/enroller/mocks/caclient.go b/pkg/initializer/common/enroller/mocks/caclient.go index 5eaacdfd..8f2ec94b 100644 --- a/pkg/initializer/common/enroller/mocks/caclient.go +++ b/pkg/initializer/common/enroller/mocks/caclient.go @@ -86,16 +86,15 @@ func (fake *CAClient) Enroll(arg1 *api.EnrollmentRequest) (*lib.EnrollmentRespon fake.enrollArgsForCall = append(fake.enrollArgsForCall, struct { arg1 *api.EnrollmentRequest }{arg1}) - stub := fake.EnrollStub - fakeReturns := fake.enrollReturns fake.recordInvocation("Enroll", []interface{}{arg1}) fake.enrollMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.EnrollStub != nil { + return fake.EnrollStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.enrollReturns return fakeReturns.result1, fakeReturns.result2 } @@ -149,16 +148,15 @@ func (fake *CAClient) GetEnrollmentRequest() *v1beta1.Enrollment { ret, specificReturn := fake.getEnrollmentRequestReturnsOnCall[len(fake.getEnrollmentRequestArgsForCall)] fake.getEnrollmentRequestArgsForCall = append(fake.getEnrollmentRequestArgsForCall, struct { }{}) - stub := fake.GetEnrollmentRequestStub - fakeReturns := fake.getEnrollmentRequestReturns fake.recordInvocation("GetEnrollmentRequest", []interface{}{}) fake.getEnrollmentRequestMutex.Unlock() - if stub != nil { - return stub() + if fake.GetEnrollmentRequestStub != nil { + return fake.GetEnrollmentRequestStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getEnrollmentRequestReturns return fakeReturns.result1 } @@ -202,16 +200,15 @@ func (fake *CAClient) GetHomeDir() string { ret, specificReturn := fake.getHomeDirReturnsOnCall[len(fake.getHomeDirArgsForCall)] fake.getHomeDirArgsForCall = append(fake.getHomeDirArgsForCall, struct { }{}) - stub := fake.GetHomeDirStub - fakeReturns := fake.getHomeDirReturns fake.recordInvocation("GetHomeDir", []interface{}{}) fake.getHomeDirMutex.Unlock() - if stub != nil { - return stub() + if fake.GetHomeDirStub != nil { + return fake.GetHomeDirStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getHomeDirReturns return fakeReturns.result1 } @@ -255,16 +252,15 @@ func (fake *CAClient) GetTLSCert() []byte { ret, specificReturn := fake.getTLSCertReturnsOnCall[len(fake.getTLSCertArgsForCall)] fake.getTLSCertArgsForCall = append(fake.getTLSCertArgsForCall, struct { }{}) - stub := fake.GetTLSCertStub - fakeReturns := fake.getTLSCertReturns fake.recordInvocation("GetTLSCert", []interface{}{}) fake.getTLSCertMutex.Unlock() - if stub != nil { - return stub() + if fake.GetTLSCertStub != nil { + return fake.GetTLSCertStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getTLSCertReturns return fakeReturns.result1 } @@ -308,16 +304,15 @@ func (fake *CAClient) Init() error { ret, specificReturn := fake.initReturnsOnCall[len(fake.initArgsForCall)] fake.initArgsForCall = append(fake.initArgsForCall, struct { }{}) - stub := fake.InitStub - fakeReturns := fake.initReturns fake.recordInvocation("Init", []interface{}{}) fake.initMutex.Unlock() - if stub != nil { - return stub() + if fake.InitStub != nil { + return fake.InitStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.initReturns return fakeReturns.result1 } @@ -362,16 +357,15 @@ func (fake *CAClient) PingCA(arg1 time.Duration) error { fake.pingCAArgsForCall = append(fake.pingCAArgsForCall, struct { arg1 time.Duration }{arg1}) - stub := fake.PingCAStub - fakeReturns := fake.pingCAReturns fake.recordInvocation("PingCA", []interface{}{arg1}) fake.pingCAMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.PingCAStub != nil { + return fake.PingCAStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.pingCAReturns return fakeReturns.result1 } diff --git a/pkg/initializer/common/enroller/mocks/client.go b/pkg/initializer/common/enroller/mocks/client.go index ee14505d..d028b255 100644 --- a/pkg/initializer/common/enroller/mocks/client.go +++ b/pkg/initializer/common/enroller/mocks/client.go @@ -142,16 +142,15 @@ func (fake *Client) Create(arg1 context.Context, arg2 client.Object, arg3 ...con arg2 client.Object arg3 []controllerclient.CreateOption }{arg1, arg2, arg3}) - stub := fake.CreateStub - fakeReturns := fake.createReturns fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3}) fake.createMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.CreateStub != nil { + return fake.CreateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.createReturns return fakeReturns.result1 } @@ -205,16 +204,15 @@ func (fake *Client) CreateOrUpdate(arg1 context.Context, arg2 client.Object, arg arg2 client.Object arg3 []controllerclient.CreateOrUpdateOption }{arg1, arg2, arg3}) - stub := fake.CreateOrUpdateStub - fakeReturns := fake.createOrUpdateReturns fake.recordInvocation("CreateOrUpdate", []interface{}{arg1, arg2, arg3}) fake.createOrUpdateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.CreateOrUpdateStub != nil { + return fake.CreateOrUpdateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.createOrUpdateReturns return fakeReturns.result1 } @@ -268,16 +266,15 @@ func (fake *Client) Delete(arg1 context.Context, arg2 client.Object, arg3 ...cli arg2 client.Object arg3 []client.DeleteOption }{arg1, arg2, arg3}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1, arg2, arg3}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -331,16 +328,15 @@ func (fake *Client) Get(arg1 context.Context, arg2 types.NamespacedName, arg3 cl arg2 types.NamespacedName arg3 client.Object }{arg1, arg2, arg3}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1, arg2, arg3}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GetStub != nil { + return fake.GetStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.getReturns return fakeReturns.result1 } @@ -394,16 +390,15 @@ func (fake *Client) List(arg1 context.Context, arg2 client.ObjectList, arg3 ...c arg2 client.ObjectList arg3 []client.ListOption }{arg1, arg2, arg3}) - stub := fake.ListStub - fakeReturns := fake.listReturns fake.recordInvocation("List", []interface{}{arg1, arg2, arg3}) fake.listMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.ListStub != nil { + return fake.ListStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.listReturns return fakeReturns.result1 } @@ -458,16 +453,15 @@ func (fake *Client) Patch(arg1 context.Context, arg2 client.Object, arg3 client. arg3 client.Patch arg4 []controllerclient.PatchOption }{arg1, arg2, arg3, arg4}) - stub := fake.PatchStub - fakeReturns := fake.patchReturns fake.recordInvocation("Patch", []interface{}{arg1, arg2, arg3, arg4}) fake.patchMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) + if fake.PatchStub != nil { + return fake.PatchStub(arg1, arg2, arg3, arg4...) } if specificReturn { return ret.result1 } + fakeReturns := fake.patchReturns return fakeReturns.result1 } @@ -522,16 +516,15 @@ func (fake *Client) PatchStatus(arg1 context.Context, arg2 client.Object, arg3 c arg3 client.Patch arg4 []controllerclient.PatchOption }{arg1, arg2, arg3, arg4}) - stub := fake.PatchStatusStub - fakeReturns := fake.patchStatusReturns fake.recordInvocation("PatchStatus", []interface{}{arg1, arg2, arg3, arg4}) fake.patchStatusMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) + if fake.PatchStatusStub != nil { + return fake.PatchStatusStub(arg1, arg2, arg3, arg4...) } if specificReturn { return ret.result1 } + fakeReturns := fake.patchStatusReturns return fakeReturns.result1 } @@ -585,16 +578,15 @@ func (fake *Client) Update(arg1 context.Context, arg2 client.Object, arg3 ...con arg2 client.Object arg3 []controllerclient.UpdateOption }{arg1, arg2, arg3}) - stub := fake.UpdateStub - fakeReturns := fake.updateReturns fake.recordInvocation("Update", []interface{}{arg1, arg2, arg3}) fake.updateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.UpdateStub != nil { + return fake.UpdateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateReturns return fakeReturns.result1 } @@ -648,16 +640,15 @@ func (fake *Client) UpdateStatus(arg1 context.Context, arg2 client.Object, arg3 arg2 client.Object arg3 []client.UpdateOption }{arg1, arg2, arg3}) - stub := fake.UpdateStatusStub - fakeReturns := fake.updateStatusReturns fake.recordInvocation("UpdateStatus", []interface{}{arg1, arg2, arg3}) fake.updateStatusMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.UpdateStatusStub != nil { + return fake.UpdateStatusStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateStatusReturns return fakeReturns.result1 } diff --git a/pkg/initializer/common/enroller/mocks/cryptoenroller.go b/pkg/initializer/common/enroller/mocks/cryptoenroller.go index 7d30e850..b0ed6daf 100644 --- a/pkg/initializer/common/enroller/mocks/cryptoenroller.go +++ b/pkg/initializer/common/enroller/mocks/cryptoenroller.go @@ -53,16 +53,15 @@ func (fake *CryptoEnroller) Enroll() (*config.Response, error) { ret, specificReturn := fake.enrollReturnsOnCall[len(fake.enrollArgsForCall)] fake.enrollArgsForCall = append(fake.enrollArgsForCall, struct { }{}) - stub := fake.EnrollStub - fakeReturns := fake.enrollReturns fake.recordInvocation("Enroll", []interface{}{}) fake.enrollMutex.Unlock() - if stub != nil { - return stub() + if fake.EnrollStub != nil { + return fake.EnrollStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.enrollReturns return fakeReturns.result1, fakeReturns.result2 } @@ -109,16 +108,15 @@ func (fake *CryptoEnroller) GetEnrollmentRequest() *v1beta1.Enrollment { ret, specificReturn := fake.getEnrollmentRequestReturnsOnCall[len(fake.getEnrollmentRequestArgsForCall)] fake.getEnrollmentRequestArgsForCall = append(fake.getEnrollmentRequestArgsForCall, struct { }{}) - stub := fake.GetEnrollmentRequestStub - fakeReturns := fake.getEnrollmentRequestReturns fake.recordInvocation("GetEnrollmentRequest", []interface{}{}) fake.getEnrollmentRequestMutex.Unlock() - if stub != nil { - return stub() + if fake.GetEnrollmentRequestStub != nil { + return fake.GetEnrollmentRequestStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getEnrollmentRequestReturns return fakeReturns.result1 } @@ -163,16 +161,15 @@ func (fake *CryptoEnroller) PingCA(arg1 time.Duration) error { fake.pingCAArgsForCall = append(fake.pingCAArgsForCall, struct { arg1 time.Duration }{arg1}) - stub := fake.PingCAStub - fakeReturns := fake.pingCAReturns fake.recordInvocation("PingCA", []interface{}{arg1}) fake.pingCAMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.PingCAStub != nil { + return fake.PingCAStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.pingCAReturns return fakeReturns.result1 } diff --git a/pkg/initializer/common/enroller/mocks/cryptoinstance.go b/pkg/initializer/common/enroller/mocks/cryptoinstance.go index adb75a79..4cb610a4 100644 --- a/pkg/initializer/common/enroller/mocks/cryptoinstance.go +++ b/pkg/initializer/common/enroller/mocks/cryptoinstance.go @@ -356,16 +356,15 @@ func (fake *CryptoInstance) DeepCopyObject() runtime.Object { ret, specificReturn := fake.deepCopyObjectReturnsOnCall[len(fake.deepCopyObjectArgsForCall)] fake.deepCopyObjectArgsForCall = append(fake.deepCopyObjectArgsForCall, struct { }{}) - stub := fake.DeepCopyObjectStub - fakeReturns := fake.deepCopyObjectReturns fake.recordInvocation("DeepCopyObject", []interface{}{}) fake.deepCopyObjectMutex.Unlock() - if stub != nil { - return stub() + if fake.DeepCopyObjectStub != nil { + return fake.DeepCopyObjectStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.deepCopyObjectReturns return fakeReturns.result1 } @@ -409,16 +408,15 @@ func (fake *CryptoInstance) EnrollerImage() string { ret, specificReturn := fake.enrollerImageReturnsOnCall[len(fake.enrollerImageArgsForCall)] fake.enrollerImageArgsForCall = append(fake.enrollerImageArgsForCall, struct { }{}) - stub := fake.EnrollerImageStub - fakeReturns := fake.enrollerImageReturns fake.recordInvocation("EnrollerImage", []interface{}{}) fake.enrollerImageMutex.Unlock() - if stub != nil { - return stub() + if fake.EnrollerImageStub != nil { + return fake.EnrollerImageStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.enrollerImageReturns return fakeReturns.result1 } @@ -462,16 +460,15 @@ func (fake *CryptoInstance) GetAnnotations() map[string]string { ret, specificReturn := fake.getAnnotationsReturnsOnCall[len(fake.getAnnotationsArgsForCall)] fake.getAnnotationsArgsForCall = append(fake.getAnnotationsArgsForCall, struct { }{}) - stub := fake.GetAnnotationsStub - fakeReturns := fake.getAnnotationsReturns fake.recordInvocation("GetAnnotations", []interface{}{}) fake.getAnnotationsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetAnnotationsStub != nil { + return fake.GetAnnotationsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getAnnotationsReturns return fakeReturns.result1 } @@ -515,16 +512,15 @@ func (fake *CryptoInstance) GetClusterName() string { ret, specificReturn := fake.getClusterNameReturnsOnCall[len(fake.getClusterNameArgsForCall)] fake.getClusterNameArgsForCall = append(fake.getClusterNameArgsForCall, struct { }{}) - stub := fake.GetClusterNameStub - fakeReturns := fake.getClusterNameReturns fake.recordInvocation("GetClusterName", []interface{}{}) fake.getClusterNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetClusterNameStub != nil { + return fake.GetClusterNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getClusterNameReturns return fakeReturns.result1 } @@ -568,16 +564,15 @@ func (fake *CryptoInstance) GetConfigOverride() (interface{}, error) { ret, specificReturn := fake.getConfigOverrideReturnsOnCall[len(fake.getConfigOverrideArgsForCall)] fake.getConfigOverrideArgsForCall = append(fake.getConfigOverrideArgsForCall, struct { }{}) - stub := fake.GetConfigOverrideStub - fakeReturns := fake.getConfigOverrideReturns fake.recordInvocation("GetConfigOverride", []interface{}{}) fake.getConfigOverrideMutex.Unlock() - if stub != nil { - return stub() + if fake.GetConfigOverrideStub != nil { + return fake.GetConfigOverrideStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getConfigOverrideReturns return fakeReturns.result1, fakeReturns.result2 } @@ -624,16 +619,15 @@ func (fake *CryptoInstance) GetCreationTimestamp() v1.Time { ret, specificReturn := fake.getCreationTimestampReturnsOnCall[len(fake.getCreationTimestampArgsForCall)] fake.getCreationTimestampArgsForCall = append(fake.getCreationTimestampArgsForCall, struct { }{}) - stub := fake.GetCreationTimestampStub - fakeReturns := fake.getCreationTimestampReturns fake.recordInvocation("GetCreationTimestamp", []interface{}{}) fake.getCreationTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetCreationTimestampStub != nil { + return fake.GetCreationTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getCreationTimestampReturns return fakeReturns.result1 } @@ -677,16 +671,15 @@ func (fake *CryptoInstance) GetDeletionGracePeriodSeconds() *int64 { ret, specificReturn := fake.getDeletionGracePeriodSecondsReturnsOnCall[len(fake.getDeletionGracePeriodSecondsArgsForCall)] fake.getDeletionGracePeriodSecondsArgsForCall = append(fake.getDeletionGracePeriodSecondsArgsForCall, struct { }{}) - stub := fake.GetDeletionGracePeriodSecondsStub - fakeReturns := fake.getDeletionGracePeriodSecondsReturns fake.recordInvocation("GetDeletionGracePeriodSeconds", []interface{}{}) fake.getDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionGracePeriodSecondsStub != nil { + return fake.GetDeletionGracePeriodSecondsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionGracePeriodSecondsReturns return fakeReturns.result1 } @@ -730,16 +723,15 @@ func (fake *CryptoInstance) GetDeletionTimestamp() *v1.Time { ret, specificReturn := fake.getDeletionTimestampReturnsOnCall[len(fake.getDeletionTimestampArgsForCall)] fake.getDeletionTimestampArgsForCall = append(fake.getDeletionTimestampArgsForCall, struct { }{}) - stub := fake.GetDeletionTimestampStub - fakeReturns := fake.getDeletionTimestampReturns fake.recordInvocation("GetDeletionTimestamp", []interface{}{}) fake.getDeletionTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionTimestampStub != nil { + return fake.GetDeletionTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionTimestampReturns return fakeReturns.result1 } @@ -783,16 +775,15 @@ func (fake *CryptoInstance) GetFinalizers() []string { ret, specificReturn := fake.getFinalizersReturnsOnCall[len(fake.getFinalizersArgsForCall)] fake.getFinalizersArgsForCall = append(fake.getFinalizersArgsForCall, struct { }{}) - stub := fake.GetFinalizersStub - fakeReturns := fake.getFinalizersReturns fake.recordInvocation("GetFinalizers", []interface{}{}) fake.getFinalizersMutex.Unlock() - if stub != nil { - return stub() + if fake.GetFinalizersStub != nil { + return fake.GetFinalizersStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getFinalizersReturns return fakeReturns.result1 } @@ -836,16 +827,15 @@ func (fake *CryptoInstance) GetGenerateName() string { ret, specificReturn := fake.getGenerateNameReturnsOnCall[len(fake.getGenerateNameArgsForCall)] fake.getGenerateNameArgsForCall = append(fake.getGenerateNameArgsForCall, struct { }{}) - stub := fake.GetGenerateNameStub - fakeReturns := fake.getGenerateNameReturns fake.recordInvocation("GetGenerateName", []interface{}{}) fake.getGenerateNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerateNameStub != nil { + return fake.GetGenerateNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerateNameReturns return fakeReturns.result1 } @@ -889,16 +879,15 @@ func (fake *CryptoInstance) GetGeneration() int64 { ret, specificReturn := fake.getGenerationReturnsOnCall[len(fake.getGenerationArgsForCall)] fake.getGenerationArgsForCall = append(fake.getGenerationArgsForCall, struct { }{}) - stub := fake.GetGenerationStub - fakeReturns := fake.getGenerationReturns fake.recordInvocation("GetGeneration", []interface{}{}) fake.getGenerationMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerationStub != nil { + return fake.GetGenerationStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerationReturns return fakeReturns.result1 } @@ -942,16 +931,15 @@ func (fake *CryptoInstance) GetLabels() map[string]string { ret, specificReturn := fake.getLabelsReturnsOnCall[len(fake.getLabelsArgsForCall)] fake.getLabelsArgsForCall = append(fake.getLabelsArgsForCall, struct { }{}) - stub := fake.GetLabelsStub - fakeReturns := fake.getLabelsReturns fake.recordInvocation("GetLabels", []interface{}{}) fake.getLabelsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetLabelsStub != nil { + return fake.GetLabelsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getLabelsReturns return fakeReturns.result1 } @@ -995,16 +983,15 @@ func (fake *CryptoInstance) GetManagedFields() []v1.ManagedFieldsEntry { ret, specificReturn := fake.getManagedFieldsReturnsOnCall[len(fake.getManagedFieldsArgsForCall)] fake.getManagedFieldsArgsForCall = append(fake.getManagedFieldsArgsForCall, struct { }{}) - stub := fake.GetManagedFieldsStub - fakeReturns := fake.getManagedFieldsReturns fake.recordInvocation("GetManagedFields", []interface{}{}) fake.getManagedFieldsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetManagedFieldsStub != nil { + return fake.GetManagedFieldsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getManagedFieldsReturns return fakeReturns.result1 } @@ -1048,16 +1035,15 @@ func (fake *CryptoInstance) GetName() string { ret, specificReturn := fake.getNameReturnsOnCall[len(fake.getNameArgsForCall)] fake.getNameArgsForCall = append(fake.getNameArgsForCall, struct { }{}) - stub := fake.GetNameStub - fakeReturns := fake.getNameReturns fake.recordInvocation("GetName", []interface{}{}) fake.getNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNameStub != nil { + return fake.GetNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNameReturns return fakeReturns.result1 } @@ -1101,16 +1087,15 @@ func (fake *CryptoInstance) GetNamespace() string { ret, specificReturn := fake.getNamespaceReturnsOnCall[len(fake.getNamespaceArgsForCall)] fake.getNamespaceArgsForCall = append(fake.getNamespaceArgsForCall, struct { }{}) - stub := fake.GetNamespaceStub - fakeReturns := fake.getNamespaceReturns fake.recordInvocation("GetNamespace", []interface{}{}) fake.getNamespaceMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNamespaceStub != nil { + return fake.GetNamespaceStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNamespaceReturns return fakeReturns.result1 } @@ -1154,16 +1139,15 @@ func (fake *CryptoInstance) GetObjectKind() schema.ObjectKind { ret, specificReturn := fake.getObjectKindReturnsOnCall[len(fake.getObjectKindArgsForCall)] fake.getObjectKindArgsForCall = append(fake.getObjectKindArgsForCall, struct { }{}) - stub := fake.GetObjectKindStub - fakeReturns := fake.getObjectKindReturns fake.recordInvocation("GetObjectKind", []interface{}{}) fake.getObjectKindMutex.Unlock() - if stub != nil { - return stub() + if fake.GetObjectKindStub != nil { + return fake.GetObjectKindStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getObjectKindReturns return fakeReturns.result1 } @@ -1207,16 +1191,15 @@ func (fake *CryptoInstance) GetOwnerReferences() []v1.OwnerReference { ret, specificReturn := fake.getOwnerReferencesReturnsOnCall[len(fake.getOwnerReferencesArgsForCall)] fake.getOwnerReferencesArgsForCall = append(fake.getOwnerReferencesArgsForCall, struct { }{}) - stub := fake.GetOwnerReferencesStub - fakeReturns := fake.getOwnerReferencesReturns fake.recordInvocation("GetOwnerReferences", []interface{}{}) fake.getOwnerReferencesMutex.Unlock() - if stub != nil { - return stub() + if fake.GetOwnerReferencesStub != nil { + return fake.GetOwnerReferencesStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getOwnerReferencesReturns return fakeReturns.result1 } @@ -1260,16 +1243,15 @@ func (fake *CryptoInstance) GetPullSecrets() []v1a.LocalObjectReference { ret, specificReturn := fake.getPullSecretsReturnsOnCall[len(fake.getPullSecretsArgsForCall)] fake.getPullSecretsArgsForCall = append(fake.getPullSecretsArgsForCall, struct { }{}) - stub := fake.GetPullSecretsStub - fakeReturns := fake.getPullSecretsReturns fake.recordInvocation("GetPullSecrets", []interface{}{}) fake.getPullSecretsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetPullSecretsStub != nil { + return fake.GetPullSecretsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getPullSecretsReturns return fakeReturns.result1 } @@ -1314,16 +1296,15 @@ func (fake *CryptoInstance) GetResource(arg1 v1beta1.Component) v1a.ResourceRequ fake.getResourceArgsForCall = append(fake.getResourceArgsForCall, struct { arg1 v1beta1.Component }{arg1}) - stub := fake.GetResourceStub - fakeReturns := fake.getResourceReturns fake.recordInvocation("GetResource", []interface{}{arg1}) fake.getResourceMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetResourceStub != nil { + return fake.GetResourceStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.getResourceReturns return fakeReturns.result1 } @@ -1374,16 +1355,15 @@ func (fake *CryptoInstance) GetResourceVersion() string { ret, specificReturn := fake.getResourceVersionReturnsOnCall[len(fake.getResourceVersionArgsForCall)] fake.getResourceVersionArgsForCall = append(fake.getResourceVersionArgsForCall, struct { }{}) - stub := fake.GetResourceVersionStub - fakeReturns := fake.getResourceVersionReturns fake.recordInvocation("GetResourceVersion", []interface{}{}) fake.getResourceVersionMutex.Unlock() - if stub != nil { - return stub() + if fake.GetResourceVersionStub != nil { + return fake.GetResourceVersionStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getResourceVersionReturns return fakeReturns.result1 } @@ -1427,16 +1407,15 @@ func (fake *CryptoInstance) GetSelfLink() string { ret, specificReturn := fake.getSelfLinkReturnsOnCall[len(fake.getSelfLinkArgsForCall)] fake.getSelfLinkArgsForCall = append(fake.getSelfLinkArgsForCall, struct { }{}) - stub := fake.GetSelfLinkStub - fakeReturns := fake.getSelfLinkReturns fake.recordInvocation("GetSelfLink", []interface{}{}) fake.getSelfLinkMutex.Unlock() - if stub != nil { - return stub() + if fake.GetSelfLinkStub != nil { + return fake.GetSelfLinkStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getSelfLinkReturns return fakeReturns.result1 } @@ -1480,16 +1459,15 @@ func (fake *CryptoInstance) GetUID() types.UID { ret, specificReturn := fake.getUIDReturnsOnCall[len(fake.getUIDArgsForCall)] fake.getUIDArgsForCall = append(fake.getUIDArgsForCall, struct { }{}) - stub := fake.GetUIDStub - fakeReturns := fake.getUIDReturns fake.recordInvocation("GetUID", []interface{}{}) fake.getUIDMutex.Unlock() - if stub != nil { - return stub() + if fake.GetUIDStub != nil { + return fake.GetUIDStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getUIDReturns return fakeReturns.result1 } @@ -1533,16 +1511,15 @@ func (fake *CryptoInstance) IsHSMEnabled() bool { ret, specificReturn := fake.isHSMEnabledReturnsOnCall[len(fake.isHSMEnabledArgsForCall)] fake.isHSMEnabledArgsForCall = append(fake.isHSMEnabledArgsForCall, struct { }{}) - stub := fake.IsHSMEnabledStub - fakeReturns := fake.isHSMEnabledReturns fake.recordInvocation("IsHSMEnabled", []interface{}{}) fake.isHSMEnabledMutex.Unlock() - if stub != nil { - return stub() + if fake.IsHSMEnabledStub != nil { + return fake.IsHSMEnabledStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.isHSMEnabledReturns return fakeReturns.result1 } @@ -1586,16 +1563,15 @@ func (fake *CryptoInstance) PVCName() string { ret, specificReturn := fake.pVCNameReturnsOnCall[len(fake.pVCNameArgsForCall)] fake.pVCNameArgsForCall = append(fake.pVCNameArgsForCall, struct { }{}) - stub := fake.PVCNameStub - fakeReturns := fake.pVCNameReturns fake.recordInvocation("PVCName", []interface{}{}) fake.pVCNameMutex.Unlock() - if stub != nil { - return stub() + if fake.PVCNameStub != nil { + return fake.PVCNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.pVCNameReturns return fakeReturns.result1 } @@ -1639,10 +1615,9 @@ func (fake *CryptoInstance) SetAnnotations(arg1 map[string]string) { fake.setAnnotationsArgsForCall = append(fake.setAnnotationsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetAnnotationsStub fake.recordInvocation("SetAnnotations", []interface{}{arg1}) fake.setAnnotationsMutex.Unlock() - if stub != nil { + if fake.SetAnnotationsStub != nil { fake.SetAnnotationsStub(arg1) } } @@ -1671,10 +1646,9 @@ func (fake *CryptoInstance) SetClusterName(arg1 string) { fake.setClusterNameArgsForCall = append(fake.setClusterNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetClusterNameStub fake.recordInvocation("SetClusterName", []interface{}{arg1}) fake.setClusterNameMutex.Unlock() - if stub != nil { + if fake.SetClusterNameStub != nil { fake.SetClusterNameStub(arg1) } } @@ -1703,10 +1677,9 @@ func (fake *CryptoInstance) SetCreationTimestamp(arg1 v1.Time) { fake.setCreationTimestampArgsForCall = append(fake.setCreationTimestampArgsForCall, struct { arg1 v1.Time }{arg1}) - stub := fake.SetCreationTimestampStub fake.recordInvocation("SetCreationTimestamp", []interface{}{arg1}) fake.setCreationTimestampMutex.Unlock() - if stub != nil { + if fake.SetCreationTimestampStub != nil { fake.SetCreationTimestampStub(arg1) } } @@ -1735,10 +1708,9 @@ func (fake *CryptoInstance) SetDeletionGracePeriodSeconds(arg1 *int64) { fake.setDeletionGracePeriodSecondsArgsForCall = append(fake.setDeletionGracePeriodSecondsArgsForCall, struct { arg1 *int64 }{arg1}) - stub := fake.SetDeletionGracePeriodSecondsStub fake.recordInvocation("SetDeletionGracePeriodSeconds", []interface{}{arg1}) fake.setDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { + if fake.SetDeletionGracePeriodSecondsStub != nil { fake.SetDeletionGracePeriodSecondsStub(arg1) } } @@ -1767,10 +1739,9 @@ func (fake *CryptoInstance) SetDeletionTimestamp(arg1 *v1.Time) { fake.setDeletionTimestampArgsForCall = append(fake.setDeletionTimestampArgsForCall, struct { arg1 *v1.Time }{arg1}) - stub := fake.SetDeletionTimestampStub fake.recordInvocation("SetDeletionTimestamp", []interface{}{arg1}) fake.setDeletionTimestampMutex.Unlock() - if stub != nil { + if fake.SetDeletionTimestampStub != nil { fake.SetDeletionTimestampStub(arg1) } } @@ -1804,10 +1775,9 @@ func (fake *CryptoInstance) SetFinalizers(arg1 []string) { fake.setFinalizersArgsForCall = append(fake.setFinalizersArgsForCall, struct { arg1 []string }{arg1Copy}) - stub := fake.SetFinalizersStub fake.recordInvocation("SetFinalizers", []interface{}{arg1Copy}) fake.setFinalizersMutex.Unlock() - if stub != nil { + if fake.SetFinalizersStub != nil { fake.SetFinalizersStub(arg1) } } @@ -1836,10 +1806,9 @@ func (fake *CryptoInstance) SetGenerateName(arg1 string) { fake.setGenerateNameArgsForCall = append(fake.setGenerateNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetGenerateNameStub fake.recordInvocation("SetGenerateName", []interface{}{arg1}) fake.setGenerateNameMutex.Unlock() - if stub != nil { + if fake.SetGenerateNameStub != nil { fake.SetGenerateNameStub(arg1) } } @@ -1868,10 +1837,9 @@ func (fake *CryptoInstance) SetGeneration(arg1 int64) { fake.setGenerationArgsForCall = append(fake.setGenerationArgsForCall, struct { arg1 int64 }{arg1}) - stub := fake.SetGenerationStub fake.recordInvocation("SetGeneration", []interface{}{arg1}) fake.setGenerationMutex.Unlock() - if stub != nil { + if fake.SetGenerationStub != nil { fake.SetGenerationStub(arg1) } } @@ -1900,10 +1868,9 @@ func (fake *CryptoInstance) SetLabels(arg1 map[string]string) { fake.setLabelsArgsForCall = append(fake.setLabelsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetLabelsStub fake.recordInvocation("SetLabels", []interface{}{arg1}) fake.setLabelsMutex.Unlock() - if stub != nil { + if fake.SetLabelsStub != nil { fake.SetLabelsStub(arg1) } } @@ -1937,10 +1904,9 @@ func (fake *CryptoInstance) SetManagedFields(arg1 []v1.ManagedFieldsEntry) { fake.setManagedFieldsArgsForCall = append(fake.setManagedFieldsArgsForCall, struct { arg1 []v1.ManagedFieldsEntry }{arg1Copy}) - stub := fake.SetManagedFieldsStub fake.recordInvocation("SetManagedFields", []interface{}{arg1Copy}) fake.setManagedFieldsMutex.Unlock() - if stub != nil { + if fake.SetManagedFieldsStub != nil { fake.SetManagedFieldsStub(arg1) } } @@ -1969,10 +1935,9 @@ func (fake *CryptoInstance) SetName(arg1 string) { fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNameStub fake.recordInvocation("SetName", []interface{}{arg1}) fake.setNameMutex.Unlock() - if stub != nil { + if fake.SetNameStub != nil { fake.SetNameStub(arg1) } } @@ -2001,10 +1966,9 @@ func (fake *CryptoInstance) SetNamespace(arg1 string) { fake.setNamespaceArgsForCall = append(fake.setNamespaceArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNamespaceStub fake.recordInvocation("SetNamespace", []interface{}{arg1}) fake.setNamespaceMutex.Unlock() - if stub != nil { + if fake.SetNamespaceStub != nil { fake.SetNamespaceStub(arg1) } } @@ -2038,10 +2002,9 @@ func (fake *CryptoInstance) SetOwnerReferences(arg1 []v1.OwnerReference) { fake.setOwnerReferencesArgsForCall = append(fake.setOwnerReferencesArgsForCall, struct { arg1 []v1.OwnerReference }{arg1Copy}) - stub := fake.SetOwnerReferencesStub fake.recordInvocation("SetOwnerReferences", []interface{}{arg1Copy}) fake.setOwnerReferencesMutex.Unlock() - if stub != nil { + if fake.SetOwnerReferencesStub != nil { fake.SetOwnerReferencesStub(arg1) } } @@ -2070,10 +2033,9 @@ func (fake *CryptoInstance) SetResourceVersion(arg1 string) { fake.setResourceVersionArgsForCall = append(fake.setResourceVersionArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetResourceVersionStub fake.recordInvocation("SetResourceVersion", []interface{}{arg1}) fake.setResourceVersionMutex.Unlock() - if stub != nil { + if fake.SetResourceVersionStub != nil { fake.SetResourceVersionStub(arg1) } } @@ -2102,10 +2064,9 @@ func (fake *CryptoInstance) SetSelfLink(arg1 string) { fake.setSelfLinkArgsForCall = append(fake.setSelfLinkArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetSelfLinkStub fake.recordInvocation("SetSelfLink", []interface{}{arg1}) fake.setSelfLinkMutex.Unlock() - if stub != nil { + if fake.SetSelfLinkStub != nil { fake.SetSelfLinkStub(arg1) } } @@ -2134,10 +2095,9 @@ func (fake *CryptoInstance) SetUID(arg1 types.UID) { fake.setUIDArgsForCall = append(fake.setUIDArgsForCall, struct { arg1 types.UID }{arg1}) - stub := fake.SetUIDStub fake.recordInvocation("SetUID", []interface{}{arg1}) fake.setUIDMutex.Unlock() - if stub != nil { + if fake.SetUIDStub != nil { fake.SetUIDStub(arg1) } } @@ -2166,16 +2126,15 @@ func (fake *CryptoInstance) UsingHSMProxy() bool { ret, specificReturn := fake.usingHSMProxyReturnsOnCall[len(fake.usingHSMProxyArgsForCall)] fake.usingHSMProxyArgsForCall = append(fake.usingHSMProxyArgsForCall, struct { }{}) - stub := fake.UsingHSMProxyStub - fakeReturns := fake.usingHSMProxyReturns fake.recordInvocation("UsingHSMProxy", []interface{}{}) fake.usingHSMProxyMutex.Unlock() - if stub != nil { - return stub() + if fake.UsingHSMProxyStub != nil { + return fake.UsingHSMProxyStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.usingHSMProxyReturns return fakeReturns.result1 } diff --git a/pkg/initializer/common/enroller/mocks/hsmcaclient.go b/pkg/initializer/common/enroller/mocks/hsmcaclient.go index c165c295..6984e211 100644 --- a/pkg/initializer/common/enroller/mocks/hsmcaclient.go +++ b/pkg/initializer/common/enroller/mocks/hsmcaclient.go @@ -66,16 +66,15 @@ func (fake *HSMCAClient) GetConfig() *lib.ClientConfig { ret, specificReturn := fake.getConfigReturnsOnCall[len(fake.getConfigArgsForCall)] fake.getConfigArgsForCall = append(fake.getConfigArgsForCall, struct { }{}) - stub := fake.GetConfigStub - fakeReturns := fake.getConfigReturns fake.recordInvocation("GetConfig", []interface{}{}) fake.getConfigMutex.Unlock() - if stub != nil { - return stub() + if fake.GetConfigStub != nil { + return fake.GetConfigStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getConfigReturns return fakeReturns.result1 } @@ -119,16 +118,15 @@ func (fake *HSMCAClient) GetEnrollmentRequest() *v1beta1.Enrollment { ret, specificReturn := fake.getEnrollmentRequestReturnsOnCall[len(fake.getEnrollmentRequestArgsForCall)] fake.getEnrollmentRequestArgsForCall = append(fake.getEnrollmentRequestArgsForCall, struct { }{}) - stub := fake.GetEnrollmentRequestStub - fakeReturns := fake.getEnrollmentRequestReturns fake.recordInvocation("GetEnrollmentRequest", []interface{}{}) fake.getEnrollmentRequestMutex.Unlock() - if stub != nil { - return stub() + if fake.GetEnrollmentRequestStub != nil { + return fake.GetEnrollmentRequestStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getEnrollmentRequestReturns return fakeReturns.result1 } @@ -172,16 +170,15 @@ func (fake *HSMCAClient) GetHomeDir() string { ret, specificReturn := fake.getHomeDirReturnsOnCall[len(fake.getHomeDirArgsForCall)] fake.getHomeDirArgsForCall = append(fake.getHomeDirArgsForCall, struct { }{}) - stub := fake.GetHomeDirStub - fakeReturns := fake.getHomeDirReturns fake.recordInvocation("GetHomeDir", []interface{}{}) fake.getHomeDirMutex.Unlock() - if stub != nil { - return stub() + if fake.GetHomeDirStub != nil { + return fake.GetHomeDirStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getHomeDirReturns return fakeReturns.result1 } @@ -226,16 +223,15 @@ func (fake *HSMCAClient) PingCA(arg1 time.Duration) error { fake.pingCAArgsForCall = append(fake.pingCAArgsForCall, struct { arg1 time.Duration }{arg1}) - stub := fake.PingCAStub - fakeReturns := fake.pingCAReturns fake.recordInvocation("PingCA", []interface{}{arg1}) fake.pingCAMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.PingCAStub != nil { + return fake.PingCAStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.pingCAReturns return fakeReturns.result1 } @@ -286,10 +282,9 @@ func (fake *HSMCAClient) SetHSMLibrary(arg1 string) { fake.setHSMLibraryArgsForCall = append(fake.setHSMLibraryArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetHSMLibraryStub fake.recordInvocation("SetHSMLibrary", []interface{}{arg1}) fake.setHSMLibraryMutex.Unlock() - if stub != nil { + if fake.SetHSMLibraryStub != nil { fake.SetHSMLibraryStub(arg1) } } diff --git a/pkg/initializer/common/enroller/mocks/instance.go b/pkg/initializer/common/enroller/mocks/instance.go index 50347060..83182c7a 100644 --- a/pkg/initializer/common/enroller/mocks/instance.go +++ b/pkg/initializer/common/enroller/mocks/instance.go @@ -302,16 +302,15 @@ func (fake *Instance) EnrollerImage() string { ret, specificReturn := fake.enrollerImageReturnsOnCall[len(fake.enrollerImageArgsForCall)] fake.enrollerImageArgsForCall = append(fake.enrollerImageArgsForCall, struct { }{}) - stub := fake.EnrollerImageStub - fakeReturns := fake.enrollerImageReturns fake.recordInvocation("EnrollerImage", []interface{}{}) fake.enrollerImageMutex.Unlock() - if stub != nil { - return stub() + if fake.EnrollerImageStub != nil { + return fake.EnrollerImageStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.enrollerImageReturns return fakeReturns.result1 } @@ -355,16 +354,15 @@ func (fake *Instance) GetAnnotations() map[string]string { ret, specificReturn := fake.getAnnotationsReturnsOnCall[len(fake.getAnnotationsArgsForCall)] fake.getAnnotationsArgsForCall = append(fake.getAnnotationsArgsForCall, struct { }{}) - stub := fake.GetAnnotationsStub - fakeReturns := fake.getAnnotationsReturns fake.recordInvocation("GetAnnotations", []interface{}{}) fake.getAnnotationsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetAnnotationsStub != nil { + return fake.GetAnnotationsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getAnnotationsReturns return fakeReturns.result1 } @@ -408,16 +406,15 @@ func (fake *Instance) GetClusterName() string { ret, specificReturn := fake.getClusterNameReturnsOnCall[len(fake.getClusterNameArgsForCall)] fake.getClusterNameArgsForCall = append(fake.getClusterNameArgsForCall, struct { }{}) - stub := fake.GetClusterNameStub - fakeReturns := fake.getClusterNameReturns fake.recordInvocation("GetClusterName", []interface{}{}) fake.getClusterNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetClusterNameStub != nil { + return fake.GetClusterNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getClusterNameReturns return fakeReturns.result1 } @@ -461,16 +458,15 @@ func (fake *Instance) GetCreationTimestamp() v1.Time { ret, specificReturn := fake.getCreationTimestampReturnsOnCall[len(fake.getCreationTimestampArgsForCall)] fake.getCreationTimestampArgsForCall = append(fake.getCreationTimestampArgsForCall, struct { }{}) - stub := fake.GetCreationTimestampStub - fakeReturns := fake.getCreationTimestampReturns fake.recordInvocation("GetCreationTimestamp", []interface{}{}) fake.getCreationTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetCreationTimestampStub != nil { + return fake.GetCreationTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getCreationTimestampReturns return fakeReturns.result1 } @@ -514,16 +510,15 @@ func (fake *Instance) GetDeletionGracePeriodSeconds() *int64 { ret, specificReturn := fake.getDeletionGracePeriodSecondsReturnsOnCall[len(fake.getDeletionGracePeriodSecondsArgsForCall)] fake.getDeletionGracePeriodSecondsArgsForCall = append(fake.getDeletionGracePeriodSecondsArgsForCall, struct { }{}) - stub := fake.GetDeletionGracePeriodSecondsStub - fakeReturns := fake.getDeletionGracePeriodSecondsReturns fake.recordInvocation("GetDeletionGracePeriodSeconds", []interface{}{}) fake.getDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionGracePeriodSecondsStub != nil { + return fake.GetDeletionGracePeriodSecondsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionGracePeriodSecondsReturns return fakeReturns.result1 } @@ -567,16 +562,15 @@ func (fake *Instance) GetDeletionTimestamp() *v1.Time { ret, specificReturn := fake.getDeletionTimestampReturnsOnCall[len(fake.getDeletionTimestampArgsForCall)] fake.getDeletionTimestampArgsForCall = append(fake.getDeletionTimestampArgsForCall, struct { }{}) - stub := fake.GetDeletionTimestampStub - fakeReturns := fake.getDeletionTimestampReturns fake.recordInvocation("GetDeletionTimestamp", []interface{}{}) fake.getDeletionTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionTimestampStub != nil { + return fake.GetDeletionTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionTimestampReturns return fakeReturns.result1 } @@ -620,16 +614,15 @@ func (fake *Instance) GetFinalizers() []string { ret, specificReturn := fake.getFinalizersReturnsOnCall[len(fake.getFinalizersArgsForCall)] fake.getFinalizersArgsForCall = append(fake.getFinalizersArgsForCall, struct { }{}) - stub := fake.GetFinalizersStub - fakeReturns := fake.getFinalizersReturns fake.recordInvocation("GetFinalizers", []interface{}{}) fake.getFinalizersMutex.Unlock() - if stub != nil { - return stub() + if fake.GetFinalizersStub != nil { + return fake.GetFinalizersStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getFinalizersReturns return fakeReturns.result1 } @@ -673,16 +666,15 @@ func (fake *Instance) GetGenerateName() string { ret, specificReturn := fake.getGenerateNameReturnsOnCall[len(fake.getGenerateNameArgsForCall)] fake.getGenerateNameArgsForCall = append(fake.getGenerateNameArgsForCall, struct { }{}) - stub := fake.GetGenerateNameStub - fakeReturns := fake.getGenerateNameReturns fake.recordInvocation("GetGenerateName", []interface{}{}) fake.getGenerateNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerateNameStub != nil { + return fake.GetGenerateNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerateNameReturns return fakeReturns.result1 } @@ -726,16 +718,15 @@ func (fake *Instance) GetGeneration() int64 { ret, specificReturn := fake.getGenerationReturnsOnCall[len(fake.getGenerationArgsForCall)] fake.getGenerationArgsForCall = append(fake.getGenerationArgsForCall, struct { }{}) - stub := fake.GetGenerationStub - fakeReturns := fake.getGenerationReturns fake.recordInvocation("GetGeneration", []interface{}{}) fake.getGenerationMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerationStub != nil { + return fake.GetGenerationStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerationReturns return fakeReturns.result1 } @@ -779,16 +770,15 @@ func (fake *Instance) GetLabels() map[string]string { ret, specificReturn := fake.getLabelsReturnsOnCall[len(fake.getLabelsArgsForCall)] fake.getLabelsArgsForCall = append(fake.getLabelsArgsForCall, struct { }{}) - stub := fake.GetLabelsStub - fakeReturns := fake.getLabelsReturns fake.recordInvocation("GetLabels", []interface{}{}) fake.getLabelsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetLabelsStub != nil { + return fake.GetLabelsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getLabelsReturns return fakeReturns.result1 } @@ -832,16 +822,15 @@ func (fake *Instance) GetManagedFields() []v1.ManagedFieldsEntry { ret, specificReturn := fake.getManagedFieldsReturnsOnCall[len(fake.getManagedFieldsArgsForCall)] fake.getManagedFieldsArgsForCall = append(fake.getManagedFieldsArgsForCall, struct { }{}) - stub := fake.GetManagedFieldsStub - fakeReturns := fake.getManagedFieldsReturns fake.recordInvocation("GetManagedFields", []interface{}{}) fake.getManagedFieldsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetManagedFieldsStub != nil { + return fake.GetManagedFieldsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getManagedFieldsReturns return fakeReturns.result1 } @@ -885,16 +874,15 @@ func (fake *Instance) GetName() string { ret, specificReturn := fake.getNameReturnsOnCall[len(fake.getNameArgsForCall)] fake.getNameArgsForCall = append(fake.getNameArgsForCall, struct { }{}) - stub := fake.GetNameStub - fakeReturns := fake.getNameReturns fake.recordInvocation("GetName", []interface{}{}) fake.getNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNameStub != nil { + return fake.GetNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNameReturns return fakeReturns.result1 } @@ -938,16 +926,15 @@ func (fake *Instance) GetNamespace() string { ret, specificReturn := fake.getNamespaceReturnsOnCall[len(fake.getNamespaceArgsForCall)] fake.getNamespaceArgsForCall = append(fake.getNamespaceArgsForCall, struct { }{}) - stub := fake.GetNamespaceStub - fakeReturns := fake.getNamespaceReturns fake.recordInvocation("GetNamespace", []interface{}{}) fake.getNamespaceMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNamespaceStub != nil { + return fake.GetNamespaceStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNamespaceReturns return fakeReturns.result1 } @@ -991,16 +978,15 @@ func (fake *Instance) GetOwnerReferences() []v1.OwnerReference { ret, specificReturn := fake.getOwnerReferencesReturnsOnCall[len(fake.getOwnerReferencesArgsForCall)] fake.getOwnerReferencesArgsForCall = append(fake.getOwnerReferencesArgsForCall, struct { }{}) - stub := fake.GetOwnerReferencesStub - fakeReturns := fake.getOwnerReferencesReturns fake.recordInvocation("GetOwnerReferences", []interface{}{}) fake.getOwnerReferencesMutex.Unlock() - if stub != nil { - return stub() + if fake.GetOwnerReferencesStub != nil { + return fake.GetOwnerReferencesStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getOwnerReferencesReturns return fakeReturns.result1 } @@ -1044,16 +1030,15 @@ func (fake *Instance) GetPullSecrets() []v1a.LocalObjectReference { ret, specificReturn := fake.getPullSecretsReturnsOnCall[len(fake.getPullSecretsArgsForCall)] fake.getPullSecretsArgsForCall = append(fake.getPullSecretsArgsForCall, struct { }{}) - stub := fake.GetPullSecretsStub - fakeReturns := fake.getPullSecretsReturns fake.recordInvocation("GetPullSecrets", []interface{}{}) fake.getPullSecretsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetPullSecretsStub != nil { + return fake.GetPullSecretsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getPullSecretsReturns return fakeReturns.result1 } @@ -1098,16 +1083,15 @@ func (fake *Instance) GetResource(arg1 v1beta1.Component) v1a.ResourceRequiremen fake.getResourceArgsForCall = append(fake.getResourceArgsForCall, struct { arg1 v1beta1.Component }{arg1}) - stub := fake.GetResourceStub - fakeReturns := fake.getResourceReturns fake.recordInvocation("GetResource", []interface{}{arg1}) fake.getResourceMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetResourceStub != nil { + return fake.GetResourceStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.getResourceReturns return fakeReturns.result1 } @@ -1158,16 +1142,15 @@ func (fake *Instance) GetResourceVersion() string { ret, specificReturn := fake.getResourceVersionReturnsOnCall[len(fake.getResourceVersionArgsForCall)] fake.getResourceVersionArgsForCall = append(fake.getResourceVersionArgsForCall, struct { }{}) - stub := fake.GetResourceVersionStub - fakeReturns := fake.getResourceVersionReturns fake.recordInvocation("GetResourceVersion", []interface{}{}) fake.getResourceVersionMutex.Unlock() - if stub != nil { - return stub() + if fake.GetResourceVersionStub != nil { + return fake.GetResourceVersionStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getResourceVersionReturns return fakeReturns.result1 } @@ -1211,16 +1194,15 @@ func (fake *Instance) GetSelfLink() string { ret, specificReturn := fake.getSelfLinkReturnsOnCall[len(fake.getSelfLinkArgsForCall)] fake.getSelfLinkArgsForCall = append(fake.getSelfLinkArgsForCall, struct { }{}) - stub := fake.GetSelfLinkStub - fakeReturns := fake.getSelfLinkReturns fake.recordInvocation("GetSelfLink", []interface{}{}) fake.getSelfLinkMutex.Unlock() - if stub != nil { - return stub() + if fake.GetSelfLinkStub != nil { + return fake.GetSelfLinkStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getSelfLinkReturns return fakeReturns.result1 } @@ -1264,16 +1246,15 @@ func (fake *Instance) GetUID() types.UID { ret, specificReturn := fake.getUIDReturnsOnCall[len(fake.getUIDArgsForCall)] fake.getUIDArgsForCall = append(fake.getUIDArgsForCall, struct { }{}) - stub := fake.GetUIDStub - fakeReturns := fake.getUIDReturns fake.recordInvocation("GetUID", []interface{}{}) fake.getUIDMutex.Unlock() - if stub != nil { - return stub() + if fake.GetUIDStub != nil { + return fake.GetUIDStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getUIDReturns return fakeReturns.result1 } @@ -1317,16 +1298,15 @@ func (fake *Instance) PVCName() string { ret, specificReturn := fake.pVCNameReturnsOnCall[len(fake.pVCNameArgsForCall)] fake.pVCNameArgsForCall = append(fake.pVCNameArgsForCall, struct { }{}) - stub := fake.PVCNameStub - fakeReturns := fake.pVCNameReturns fake.recordInvocation("PVCName", []interface{}{}) fake.pVCNameMutex.Unlock() - if stub != nil { - return stub() + if fake.PVCNameStub != nil { + return fake.PVCNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.pVCNameReturns return fakeReturns.result1 } @@ -1370,10 +1350,9 @@ func (fake *Instance) SetAnnotations(arg1 map[string]string) { fake.setAnnotationsArgsForCall = append(fake.setAnnotationsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetAnnotationsStub fake.recordInvocation("SetAnnotations", []interface{}{arg1}) fake.setAnnotationsMutex.Unlock() - if stub != nil { + if fake.SetAnnotationsStub != nil { fake.SetAnnotationsStub(arg1) } } @@ -1402,10 +1381,9 @@ func (fake *Instance) SetClusterName(arg1 string) { fake.setClusterNameArgsForCall = append(fake.setClusterNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetClusterNameStub fake.recordInvocation("SetClusterName", []interface{}{arg1}) fake.setClusterNameMutex.Unlock() - if stub != nil { + if fake.SetClusterNameStub != nil { fake.SetClusterNameStub(arg1) } } @@ -1434,10 +1412,9 @@ func (fake *Instance) SetCreationTimestamp(arg1 v1.Time) { fake.setCreationTimestampArgsForCall = append(fake.setCreationTimestampArgsForCall, struct { arg1 v1.Time }{arg1}) - stub := fake.SetCreationTimestampStub fake.recordInvocation("SetCreationTimestamp", []interface{}{arg1}) fake.setCreationTimestampMutex.Unlock() - if stub != nil { + if fake.SetCreationTimestampStub != nil { fake.SetCreationTimestampStub(arg1) } } @@ -1466,10 +1443,9 @@ func (fake *Instance) SetDeletionGracePeriodSeconds(arg1 *int64) { fake.setDeletionGracePeriodSecondsArgsForCall = append(fake.setDeletionGracePeriodSecondsArgsForCall, struct { arg1 *int64 }{arg1}) - stub := fake.SetDeletionGracePeriodSecondsStub fake.recordInvocation("SetDeletionGracePeriodSeconds", []interface{}{arg1}) fake.setDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { + if fake.SetDeletionGracePeriodSecondsStub != nil { fake.SetDeletionGracePeriodSecondsStub(arg1) } } @@ -1498,10 +1474,9 @@ func (fake *Instance) SetDeletionTimestamp(arg1 *v1.Time) { fake.setDeletionTimestampArgsForCall = append(fake.setDeletionTimestampArgsForCall, struct { arg1 *v1.Time }{arg1}) - stub := fake.SetDeletionTimestampStub fake.recordInvocation("SetDeletionTimestamp", []interface{}{arg1}) fake.setDeletionTimestampMutex.Unlock() - if stub != nil { + if fake.SetDeletionTimestampStub != nil { fake.SetDeletionTimestampStub(arg1) } } @@ -1535,10 +1510,9 @@ func (fake *Instance) SetFinalizers(arg1 []string) { fake.setFinalizersArgsForCall = append(fake.setFinalizersArgsForCall, struct { arg1 []string }{arg1Copy}) - stub := fake.SetFinalizersStub fake.recordInvocation("SetFinalizers", []interface{}{arg1Copy}) fake.setFinalizersMutex.Unlock() - if stub != nil { + if fake.SetFinalizersStub != nil { fake.SetFinalizersStub(arg1) } } @@ -1567,10 +1541,9 @@ func (fake *Instance) SetGenerateName(arg1 string) { fake.setGenerateNameArgsForCall = append(fake.setGenerateNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetGenerateNameStub fake.recordInvocation("SetGenerateName", []interface{}{arg1}) fake.setGenerateNameMutex.Unlock() - if stub != nil { + if fake.SetGenerateNameStub != nil { fake.SetGenerateNameStub(arg1) } } @@ -1599,10 +1572,9 @@ func (fake *Instance) SetGeneration(arg1 int64) { fake.setGenerationArgsForCall = append(fake.setGenerationArgsForCall, struct { arg1 int64 }{arg1}) - stub := fake.SetGenerationStub fake.recordInvocation("SetGeneration", []interface{}{arg1}) fake.setGenerationMutex.Unlock() - if stub != nil { + if fake.SetGenerationStub != nil { fake.SetGenerationStub(arg1) } } @@ -1631,10 +1603,9 @@ func (fake *Instance) SetLabels(arg1 map[string]string) { fake.setLabelsArgsForCall = append(fake.setLabelsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetLabelsStub fake.recordInvocation("SetLabels", []interface{}{arg1}) fake.setLabelsMutex.Unlock() - if stub != nil { + if fake.SetLabelsStub != nil { fake.SetLabelsStub(arg1) } } @@ -1668,10 +1639,9 @@ func (fake *Instance) SetManagedFields(arg1 []v1.ManagedFieldsEntry) { fake.setManagedFieldsArgsForCall = append(fake.setManagedFieldsArgsForCall, struct { arg1 []v1.ManagedFieldsEntry }{arg1Copy}) - stub := fake.SetManagedFieldsStub fake.recordInvocation("SetManagedFields", []interface{}{arg1Copy}) fake.setManagedFieldsMutex.Unlock() - if stub != nil { + if fake.SetManagedFieldsStub != nil { fake.SetManagedFieldsStub(arg1) } } @@ -1700,10 +1670,9 @@ func (fake *Instance) SetName(arg1 string) { fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNameStub fake.recordInvocation("SetName", []interface{}{arg1}) fake.setNameMutex.Unlock() - if stub != nil { + if fake.SetNameStub != nil { fake.SetNameStub(arg1) } } @@ -1732,10 +1701,9 @@ func (fake *Instance) SetNamespace(arg1 string) { fake.setNamespaceArgsForCall = append(fake.setNamespaceArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNamespaceStub fake.recordInvocation("SetNamespace", []interface{}{arg1}) fake.setNamespaceMutex.Unlock() - if stub != nil { + if fake.SetNamespaceStub != nil { fake.SetNamespaceStub(arg1) } } @@ -1769,10 +1737,9 @@ func (fake *Instance) SetOwnerReferences(arg1 []v1.OwnerReference) { fake.setOwnerReferencesArgsForCall = append(fake.setOwnerReferencesArgsForCall, struct { arg1 []v1.OwnerReference }{arg1Copy}) - stub := fake.SetOwnerReferencesStub fake.recordInvocation("SetOwnerReferences", []interface{}{arg1Copy}) fake.setOwnerReferencesMutex.Unlock() - if stub != nil { + if fake.SetOwnerReferencesStub != nil { fake.SetOwnerReferencesStub(arg1) } } @@ -1801,10 +1768,9 @@ func (fake *Instance) SetResourceVersion(arg1 string) { fake.setResourceVersionArgsForCall = append(fake.setResourceVersionArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetResourceVersionStub fake.recordInvocation("SetResourceVersion", []interface{}{arg1}) fake.setResourceVersionMutex.Unlock() - if stub != nil { + if fake.SetResourceVersionStub != nil { fake.SetResourceVersionStub(arg1) } } @@ -1833,10 +1799,9 @@ func (fake *Instance) SetSelfLink(arg1 string) { fake.setSelfLinkArgsForCall = append(fake.setSelfLinkArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetSelfLinkStub fake.recordInvocation("SetSelfLink", []interface{}{arg1}) fake.setSelfLinkMutex.Unlock() - if stub != nil { + if fake.SetSelfLinkStub != nil { fake.SetSelfLinkStub(arg1) } } @@ -1865,10 +1830,9 @@ func (fake *Instance) SetUID(arg1 types.UID) { fake.setUIDArgsForCall = append(fake.setUIDArgsForCall, struct { arg1 types.UID }{arg1}) - stub := fake.SetUIDStub fake.recordInvocation("SetUID", []interface{}{arg1}) fake.setUIDMutex.Unlock() - if stub != nil { + if fake.SetUIDStub != nil { fake.SetUIDStub(arg1) } } diff --git a/pkg/initializer/common/mocks/cryptovalidator.go b/pkg/initializer/common/mocks/cryptovalidator.go index 91e94a40..5a082a44 100644 --- a/pkg/initializer/common/mocks/cryptovalidator.go +++ b/pkg/initializer/common/mocks/cryptovalidator.go @@ -61,16 +61,15 @@ func (fake *CryptoValidator) CheckClientAuthCrypto(arg1 v1.Object, arg2 string) arg1 v1.Object arg2 string }{arg1, arg2}) - stub := fake.CheckClientAuthCryptoStub - fakeReturns := fake.checkClientAuthCryptoReturns fake.recordInvocation("CheckClientAuthCrypto", []interface{}{arg1, arg2}) fake.checkClientAuthCryptoMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.CheckClientAuthCryptoStub != nil { + return fake.CheckClientAuthCryptoStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.checkClientAuthCryptoReturns return fakeReturns.result1 } @@ -123,16 +122,15 @@ func (fake *CryptoValidator) CheckEcertCrypto(arg1 v1.Object, arg2 string) error arg1 v1.Object arg2 string }{arg1, arg2}) - stub := fake.CheckEcertCryptoStub - fakeReturns := fake.checkEcertCryptoReturns fake.recordInvocation("CheckEcertCrypto", []interface{}{arg1, arg2}) fake.checkEcertCryptoMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.CheckEcertCryptoStub != nil { + return fake.CheckEcertCryptoStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.checkEcertCryptoReturns return fakeReturns.result1 } @@ -185,16 +183,15 @@ func (fake *CryptoValidator) CheckTLSCrypto(arg1 v1.Object, arg2 string) error { arg1 v1.Object arg2 string }{arg1, arg2}) - stub := fake.CheckTLSCryptoStub - fakeReturns := fake.checkTLSCryptoReturns fake.recordInvocation("CheckTLSCrypto", []interface{}{arg1, arg2}) fake.checkTLSCryptoMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.CheckTLSCryptoStub != nil { + return fake.CheckTLSCryptoStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.checkTLSCryptoReturns return fakeReturns.result1 } @@ -245,10 +242,9 @@ func (fake *CryptoValidator) SetHSMEnabled(arg1 bool) { fake.setHSMEnabledArgsForCall = append(fake.setHSMEnabledArgsForCall, struct { arg1 bool }{arg1}) - stub := fake.SetHSMEnabledStub fake.recordInvocation("SetHSMEnabled", []interface{}{arg1}) fake.setHSMEnabledMutex.Unlock() - if stub != nil { + if fake.SetHSMEnabledStub != nil { fake.SetHSMEnabledStub(arg1) } } diff --git a/pkg/initializer/cryptogen/mocks/config.go b/pkg/initializer/cryptogen/mocks/config.go index d1cb451e..5aa428fb 100644 --- a/pkg/initializer/cryptogen/mocks/config.go +++ b/pkg/initializer/cryptogen/mocks/config.go @@ -37,16 +37,15 @@ func (fake *Config) GetBCCSPSection() *common.BCCSP { ret, specificReturn := fake.getBCCSPSectionReturnsOnCall[len(fake.getBCCSPSectionArgsForCall)] fake.getBCCSPSectionArgsForCall = append(fake.getBCCSPSectionArgsForCall, struct { }{}) - stub := fake.GetBCCSPSectionStub - fakeReturns := fake.getBCCSPSectionReturns fake.recordInvocation("GetBCCSPSection", []interface{}{}) fake.getBCCSPSectionMutex.Unlock() - if stub != nil { - return stub() + if fake.GetBCCSPSectionStub != nil { + return fake.GetBCCSPSectionStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getBCCSPSectionReturns return fakeReturns.result1 } @@ -89,10 +88,9 @@ func (fake *Config) SetDefaultKeyStore() { fake.setDefaultKeyStoreMutex.Lock() fake.setDefaultKeyStoreArgsForCall = append(fake.setDefaultKeyStoreArgsForCall, struct { }{}) - stub := fake.SetDefaultKeyStoreStub fake.recordInvocation("SetDefaultKeyStore", []interface{}{}) fake.setDefaultKeyStoreMutex.Unlock() - if stub != nil { + if fake.SetDefaultKeyStoreStub != nil { fake.SetDefaultKeyStoreStub() } } @@ -114,10 +112,9 @@ func (fake *Config) SetPKCS11Defaults(arg1 bool) { fake.setPKCS11DefaultsArgsForCall = append(fake.setPKCS11DefaultsArgsForCall, struct { arg1 bool }{arg1}) - stub := fake.SetPKCS11DefaultsStub fake.recordInvocation("SetPKCS11Defaults", []interface{}{arg1}) fake.setPKCS11DefaultsMutex.Unlock() - if stub != nil { + if fake.SetPKCS11DefaultsStub != nil { fake.SetPKCS11DefaultsStub(arg1) } } diff --git a/pkg/initializer/cryptogen/mocks/instance.go b/pkg/initializer/cryptogen/mocks/instance.go index 9a74e6aa..6ddd524a 100644 --- a/pkg/initializer/cryptogen/mocks/instance.go +++ b/pkg/initializer/cryptogen/mocks/instance.go @@ -313,16 +313,15 @@ func (fake *Instance) DeepCopyObject() runtime.Object { ret, specificReturn := fake.deepCopyObjectReturnsOnCall[len(fake.deepCopyObjectArgsForCall)] fake.deepCopyObjectArgsForCall = append(fake.deepCopyObjectArgsForCall, struct { }{}) - stub := fake.DeepCopyObjectStub - fakeReturns := fake.deepCopyObjectReturns fake.recordInvocation("DeepCopyObject", []interface{}{}) fake.deepCopyObjectMutex.Unlock() - if stub != nil { - return stub() + if fake.DeepCopyObjectStub != nil { + return fake.DeepCopyObjectStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.deepCopyObjectReturns return fakeReturns.result1 } @@ -366,16 +365,15 @@ func (fake *Instance) GetAnnotations() map[string]string { ret, specificReturn := fake.getAnnotationsReturnsOnCall[len(fake.getAnnotationsArgsForCall)] fake.getAnnotationsArgsForCall = append(fake.getAnnotationsArgsForCall, struct { }{}) - stub := fake.GetAnnotationsStub - fakeReturns := fake.getAnnotationsReturns fake.recordInvocation("GetAnnotations", []interface{}{}) fake.getAnnotationsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetAnnotationsStub != nil { + return fake.GetAnnotationsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getAnnotationsReturns return fakeReturns.result1 } @@ -419,16 +417,15 @@ func (fake *Instance) GetClusterName() string { ret, specificReturn := fake.getClusterNameReturnsOnCall[len(fake.getClusterNameArgsForCall)] fake.getClusterNameArgsForCall = append(fake.getClusterNameArgsForCall, struct { }{}) - stub := fake.GetClusterNameStub - fakeReturns := fake.getClusterNameReturns fake.recordInvocation("GetClusterName", []interface{}{}) fake.getClusterNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetClusterNameStub != nil { + return fake.GetClusterNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getClusterNameReturns return fakeReturns.result1 } @@ -472,16 +469,15 @@ func (fake *Instance) GetConfigOverride() (interface{}, error) { ret, specificReturn := fake.getConfigOverrideReturnsOnCall[len(fake.getConfigOverrideArgsForCall)] fake.getConfigOverrideArgsForCall = append(fake.getConfigOverrideArgsForCall, struct { }{}) - stub := fake.GetConfigOverrideStub - fakeReturns := fake.getConfigOverrideReturns fake.recordInvocation("GetConfigOverride", []interface{}{}) fake.getConfigOverrideMutex.Unlock() - if stub != nil { - return stub() + if fake.GetConfigOverrideStub != nil { + return fake.GetConfigOverrideStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getConfigOverrideReturns return fakeReturns.result1, fakeReturns.result2 } @@ -528,16 +524,15 @@ func (fake *Instance) GetCreationTimestamp() v1.Time { ret, specificReturn := fake.getCreationTimestampReturnsOnCall[len(fake.getCreationTimestampArgsForCall)] fake.getCreationTimestampArgsForCall = append(fake.getCreationTimestampArgsForCall, struct { }{}) - stub := fake.GetCreationTimestampStub - fakeReturns := fake.getCreationTimestampReturns fake.recordInvocation("GetCreationTimestamp", []interface{}{}) fake.getCreationTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetCreationTimestampStub != nil { + return fake.GetCreationTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getCreationTimestampReturns return fakeReturns.result1 } @@ -581,16 +576,15 @@ func (fake *Instance) GetDeletionGracePeriodSeconds() *int64 { ret, specificReturn := fake.getDeletionGracePeriodSecondsReturnsOnCall[len(fake.getDeletionGracePeriodSecondsArgsForCall)] fake.getDeletionGracePeriodSecondsArgsForCall = append(fake.getDeletionGracePeriodSecondsArgsForCall, struct { }{}) - stub := fake.GetDeletionGracePeriodSecondsStub - fakeReturns := fake.getDeletionGracePeriodSecondsReturns fake.recordInvocation("GetDeletionGracePeriodSeconds", []interface{}{}) fake.getDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionGracePeriodSecondsStub != nil { + return fake.GetDeletionGracePeriodSecondsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionGracePeriodSecondsReturns return fakeReturns.result1 } @@ -634,16 +628,15 @@ func (fake *Instance) GetDeletionTimestamp() *v1.Time { ret, specificReturn := fake.getDeletionTimestampReturnsOnCall[len(fake.getDeletionTimestampArgsForCall)] fake.getDeletionTimestampArgsForCall = append(fake.getDeletionTimestampArgsForCall, struct { }{}) - stub := fake.GetDeletionTimestampStub - fakeReturns := fake.getDeletionTimestampReturns fake.recordInvocation("GetDeletionTimestamp", []interface{}{}) fake.getDeletionTimestampMutex.Unlock() - if stub != nil { - return stub() + if fake.GetDeletionTimestampStub != nil { + return fake.GetDeletionTimestampStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getDeletionTimestampReturns return fakeReturns.result1 } @@ -687,16 +680,15 @@ func (fake *Instance) GetFinalizers() []string { ret, specificReturn := fake.getFinalizersReturnsOnCall[len(fake.getFinalizersArgsForCall)] fake.getFinalizersArgsForCall = append(fake.getFinalizersArgsForCall, struct { }{}) - stub := fake.GetFinalizersStub - fakeReturns := fake.getFinalizersReturns fake.recordInvocation("GetFinalizers", []interface{}{}) fake.getFinalizersMutex.Unlock() - if stub != nil { - return stub() + if fake.GetFinalizersStub != nil { + return fake.GetFinalizersStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getFinalizersReturns return fakeReturns.result1 } @@ -740,16 +732,15 @@ func (fake *Instance) GetGenerateName() string { ret, specificReturn := fake.getGenerateNameReturnsOnCall[len(fake.getGenerateNameArgsForCall)] fake.getGenerateNameArgsForCall = append(fake.getGenerateNameArgsForCall, struct { }{}) - stub := fake.GetGenerateNameStub - fakeReturns := fake.getGenerateNameReturns fake.recordInvocation("GetGenerateName", []interface{}{}) fake.getGenerateNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerateNameStub != nil { + return fake.GetGenerateNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerateNameReturns return fakeReturns.result1 } @@ -793,16 +784,15 @@ func (fake *Instance) GetGeneration() int64 { ret, specificReturn := fake.getGenerationReturnsOnCall[len(fake.getGenerationArgsForCall)] fake.getGenerationArgsForCall = append(fake.getGenerationArgsForCall, struct { }{}) - stub := fake.GetGenerationStub - fakeReturns := fake.getGenerationReturns fake.recordInvocation("GetGeneration", []interface{}{}) fake.getGenerationMutex.Unlock() - if stub != nil { - return stub() + if fake.GetGenerationStub != nil { + return fake.GetGenerationStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getGenerationReturns return fakeReturns.result1 } @@ -846,16 +836,15 @@ func (fake *Instance) GetLabels() map[string]string { ret, specificReturn := fake.getLabelsReturnsOnCall[len(fake.getLabelsArgsForCall)] fake.getLabelsArgsForCall = append(fake.getLabelsArgsForCall, struct { }{}) - stub := fake.GetLabelsStub - fakeReturns := fake.getLabelsReturns fake.recordInvocation("GetLabels", []interface{}{}) fake.getLabelsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetLabelsStub != nil { + return fake.GetLabelsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getLabelsReturns return fakeReturns.result1 } @@ -899,16 +888,15 @@ func (fake *Instance) GetManagedFields() []v1.ManagedFieldsEntry { ret, specificReturn := fake.getManagedFieldsReturnsOnCall[len(fake.getManagedFieldsArgsForCall)] fake.getManagedFieldsArgsForCall = append(fake.getManagedFieldsArgsForCall, struct { }{}) - stub := fake.GetManagedFieldsStub - fakeReturns := fake.getManagedFieldsReturns fake.recordInvocation("GetManagedFields", []interface{}{}) fake.getManagedFieldsMutex.Unlock() - if stub != nil { - return stub() + if fake.GetManagedFieldsStub != nil { + return fake.GetManagedFieldsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getManagedFieldsReturns return fakeReturns.result1 } @@ -952,16 +940,15 @@ func (fake *Instance) GetName() string { ret, specificReturn := fake.getNameReturnsOnCall[len(fake.getNameArgsForCall)] fake.getNameArgsForCall = append(fake.getNameArgsForCall, struct { }{}) - stub := fake.GetNameStub - fakeReturns := fake.getNameReturns fake.recordInvocation("GetName", []interface{}{}) fake.getNameMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNameStub != nil { + return fake.GetNameStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNameReturns return fakeReturns.result1 } @@ -1005,16 +992,15 @@ func (fake *Instance) GetNamespace() string { ret, specificReturn := fake.getNamespaceReturnsOnCall[len(fake.getNamespaceArgsForCall)] fake.getNamespaceArgsForCall = append(fake.getNamespaceArgsForCall, struct { }{}) - stub := fake.GetNamespaceStub - fakeReturns := fake.getNamespaceReturns fake.recordInvocation("GetNamespace", []interface{}{}) fake.getNamespaceMutex.Unlock() - if stub != nil { - return stub() + if fake.GetNamespaceStub != nil { + return fake.GetNamespaceStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getNamespaceReturns return fakeReturns.result1 } @@ -1058,16 +1044,15 @@ func (fake *Instance) GetObjectKind() schema.ObjectKind { ret, specificReturn := fake.getObjectKindReturnsOnCall[len(fake.getObjectKindArgsForCall)] fake.getObjectKindArgsForCall = append(fake.getObjectKindArgsForCall, struct { }{}) - stub := fake.GetObjectKindStub - fakeReturns := fake.getObjectKindReturns fake.recordInvocation("GetObjectKind", []interface{}{}) fake.getObjectKindMutex.Unlock() - if stub != nil { - return stub() + if fake.GetObjectKindStub != nil { + return fake.GetObjectKindStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getObjectKindReturns return fakeReturns.result1 } @@ -1111,16 +1096,15 @@ func (fake *Instance) GetOwnerReferences() []v1.OwnerReference { ret, specificReturn := fake.getOwnerReferencesReturnsOnCall[len(fake.getOwnerReferencesArgsForCall)] fake.getOwnerReferencesArgsForCall = append(fake.getOwnerReferencesArgsForCall, struct { }{}) - stub := fake.GetOwnerReferencesStub - fakeReturns := fake.getOwnerReferencesReturns fake.recordInvocation("GetOwnerReferences", []interface{}{}) fake.getOwnerReferencesMutex.Unlock() - if stub != nil { - return stub() + if fake.GetOwnerReferencesStub != nil { + return fake.GetOwnerReferencesStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getOwnerReferencesReturns return fakeReturns.result1 } @@ -1164,16 +1148,15 @@ func (fake *Instance) GetResourceVersion() string { ret, specificReturn := fake.getResourceVersionReturnsOnCall[len(fake.getResourceVersionArgsForCall)] fake.getResourceVersionArgsForCall = append(fake.getResourceVersionArgsForCall, struct { }{}) - stub := fake.GetResourceVersionStub - fakeReturns := fake.getResourceVersionReturns fake.recordInvocation("GetResourceVersion", []interface{}{}) fake.getResourceVersionMutex.Unlock() - if stub != nil { - return stub() + if fake.GetResourceVersionStub != nil { + return fake.GetResourceVersionStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getResourceVersionReturns return fakeReturns.result1 } @@ -1217,16 +1200,15 @@ func (fake *Instance) GetSelfLink() string { ret, specificReturn := fake.getSelfLinkReturnsOnCall[len(fake.getSelfLinkArgsForCall)] fake.getSelfLinkArgsForCall = append(fake.getSelfLinkArgsForCall, struct { }{}) - stub := fake.GetSelfLinkStub - fakeReturns := fake.getSelfLinkReturns fake.recordInvocation("GetSelfLink", []interface{}{}) fake.getSelfLinkMutex.Unlock() - if stub != nil { - return stub() + if fake.GetSelfLinkStub != nil { + return fake.GetSelfLinkStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getSelfLinkReturns return fakeReturns.result1 } @@ -1270,16 +1252,15 @@ func (fake *Instance) GetUID() types.UID { ret, specificReturn := fake.getUIDReturnsOnCall[len(fake.getUIDArgsForCall)] fake.getUIDArgsForCall = append(fake.getUIDArgsForCall, struct { }{}) - stub := fake.GetUIDStub - fakeReturns := fake.getUIDReturns fake.recordInvocation("GetUID", []interface{}{}) fake.getUIDMutex.Unlock() - if stub != nil { - return stub() + if fake.GetUIDStub != nil { + return fake.GetUIDStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getUIDReturns return fakeReturns.result1 } @@ -1323,16 +1304,15 @@ func (fake *Instance) IsHSMEnabled() bool { ret, specificReturn := fake.isHSMEnabledReturnsOnCall[len(fake.isHSMEnabledArgsForCall)] fake.isHSMEnabledArgsForCall = append(fake.isHSMEnabledArgsForCall, struct { }{}) - stub := fake.IsHSMEnabledStub - fakeReturns := fake.isHSMEnabledReturns fake.recordInvocation("IsHSMEnabled", []interface{}{}) fake.isHSMEnabledMutex.Unlock() - if stub != nil { - return stub() + if fake.IsHSMEnabledStub != nil { + return fake.IsHSMEnabledStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.isHSMEnabledReturns return fakeReturns.result1 } @@ -1376,10 +1356,9 @@ func (fake *Instance) SetAnnotations(arg1 map[string]string) { fake.setAnnotationsArgsForCall = append(fake.setAnnotationsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetAnnotationsStub fake.recordInvocation("SetAnnotations", []interface{}{arg1}) fake.setAnnotationsMutex.Unlock() - if stub != nil { + if fake.SetAnnotationsStub != nil { fake.SetAnnotationsStub(arg1) } } @@ -1408,10 +1387,9 @@ func (fake *Instance) SetClusterName(arg1 string) { fake.setClusterNameArgsForCall = append(fake.setClusterNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetClusterNameStub fake.recordInvocation("SetClusterName", []interface{}{arg1}) fake.setClusterNameMutex.Unlock() - if stub != nil { + if fake.SetClusterNameStub != nil { fake.SetClusterNameStub(arg1) } } @@ -1440,10 +1418,9 @@ func (fake *Instance) SetCreationTimestamp(arg1 v1.Time) { fake.setCreationTimestampArgsForCall = append(fake.setCreationTimestampArgsForCall, struct { arg1 v1.Time }{arg1}) - stub := fake.SetCreationTimestampStub fake.recordInvocation("SetCreationTimestamp", []interface{}{arg1}) fake.setCreationTimestampMutex.Unlock() - if stub != nil { + if fake.SetCreationTimestampStub != nil { fake.SetCreationTimestampStub(arg1) } } @@ -1472,10 +1449,9 @@ func (fake *Instance) SetDeletionGracePeriodSeconds(arg1 *int64) { fake.setDeletionGracePeriodSecondsArgsForCall = append(fake.setDeletionGracePeriodSecondsArgsForCall, struct { arg1 *int64 }{arg1}) - stub := fake.SetDeletionGracePeriodSecondsStub fake.recordInvocation("SetDeletionGracePeriodSeconds", []interface{}{arg1}) fake.setDeletionGracePeriodSecondsMutex.Unlock() - if stub != nil { + if fake.SetDeletionGracePeriodSecondsStub != nil { fake.SetDeletionGracePeriodSecondsStub(arg1) } } @@ -1504,10 +1480,9 @@ func (fake *Instance) SetDeletionTimestamp(arg1 *v1.Time) { fake.setDeletionTimestampArgsForCall = append(fake.setDeletionTimestampArgsForCall, struct { arg1 *v1.Time }{arg1}) - stub := fake.SetDeletionTimestampStub fake.recordInvocation("SetDeletionTimestamp", []interface{}{arg1}) fake.setDeletionTimestampMutex.Unlock() - if stub != nil { + if fake.SetDeletionTimestampStub != nil { fake.SetDeletionTimestampStub(arg1) } } @@ -1541,10 +1516,9 @@ func (fake *Instance) SetFinalizers(arg1 []string) { fake.setFinalizersArgsForCall = append(fake.setFinalizersArgsForCall, struct { arg1 []string }{arg1Copy}) - stub := fake.SetFinalizersStub fake.recordInvocation("SetFinalizers", []interface{}{arg1Copy}) fake.setFinalizersMutex.Unlock() - if stub != nil { + if fake.SetFinalizersStub != nil { fake.SetFinalizersStub(arg1) } } @@ -1573,10 +1547,9 @@ func (fake *Instance) SetGenerateName(arg1 string) { fake.setGenerateNameArgsForCall = append(fake.setGenerateNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetGenerateNameStub fake.recordInvocation("SetGenerateName", []interface{}{arg1}) fake.setGenerateNameMutex.Unlock() - if stub != nil { + if fake.SetGenerateNameStub != nil { fake.SetGenerateNameStub(arg1) } } @@ -1605,10 +1578,9 @@ func (fake *Instance) SetGeneration(arg1 int64) { fake.setGenerationArgsForCall = append(fake.setGenerationArgsForCall, struct { arg1 int64 }{arg1}) - stub := fake.SetGenerationStub fake.recordInvocation("SetGeneration", []interface{}{arg1}) fake.setGenerationMutex.Unlock() - if stub != nil { + if fake.SetGenerationStub != nil { fake.SetGenerationStub(arg1) } } @@ -1637,10 +1609,9 @@ func (fake *Instance) SetLabels(arg1 map[string]string) { fake.setLabelsArgsForCall = append(fake.setLabelsArgsForCall, struct { arg1 map[string]string }{arg1}) - stub := fake.SetLabelsStub fake.recordInvocation("SetLabels", []interface{}{arg1}) fake.setLabelsMutex.Unlock() - if stub != nil { + if fake.SetLabelsStub != nil { fake.SetLabelsStub(arg1) } } @@ -1674,10 +1645,9 @@ func (fake *Instance) SetManagedFields(arg1 []v1.ManagedFieldsEntry) { fake.setManagedFieldsArgsForCall = append(fake.setManagedFieldsArgsForCall, struct { arg1 []v1.ManagedFieldsEntry }{arg1Copy}) - stub := fake.SetManagedFieldsStub fake.recordInvocation("SetManagedFields", []interface{}{arg1Copy}) fake.setManagedFieldsMutex.Unlock() - if stub != nil { + if fake.SetManagedFieldsStub != nil { fake.SetManagedFieldsStub(arg1) } } @@ -1706,10 +1676,9 @@ func (fake *Instance) SetName(arg1 string) { fake.setNameArgsForCall = append(fake.setNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNameStub fake.recordInvocation("SetName", []interface{}{arg1}) fake.setNameMutex.Unlock() - if stub != nil { + if fake.SetNameStub != nil { fake.SetNameStub(arg1) } } @@ -1738,10 +1707,9 @@ func (fake *Instance) SetNamespace(arg1 string) { fake.setNamespaceArgsForCall = append(fake.setNamespaceArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetNamespaceStub fake.recordInvocation("SetNamespace", []interface{}{arg1}) fake.setNamespaceMutex.Unlock() - if stub != nil { + if fake.SetNamespaceStub != nil { fake.SetNamespaceStub(arg1) } } @@ -1775,10 +1743,9 @@ func (fake *Instance) SetOwnerReferences(arg1 []v1.OwnerReference) { fake.setOwnerReferencesArgsForCall = append(fake.setOwnerReferencesArgsForCall, struct { arg1 []v1.OwnerReference }{arg1Copy}) - stub := fake.SetOwnerReferencesStub fake.recordInvocation("SetOwnerReferences", []interface{}{arg1Copy}) fake.setOwnerReferencesMutex.Unlock() - if stub != nil { + if fake.SetOwnerReferencesStub != nil { fake.SetOwnerReferencesStub(arg1) } } @@ -1807,10 +1774,9 @@ func (fake *Instance) SetResourceVersion(arg1 string) { fake.setResourceVersionArgsForCall = append(fake.setResourceVersionArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetResourceVersionStub fake.recordInvocation("SetResourceVersion", []interface{}{arg1}) fake.setResourceVersionMutex.Unlock() - if stub != nil { + if fake.SetResourceVersionStub != nil { fake.SetResourceVersionStub(arg1) } } @@ -1839,10 +1805,9 @@ func (fake *Instance) SetSelfLink(arg1 string) { fake.setSelfLinkArgsForCall = append(fake.setSelfLinkArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetSelfLinkStub fake.recordInvocation("SetSelfLink", []interface{}{arg1}) fake.setSelfLinkMutex.Unlock() - if stub != nil { + if fake.SetSelfLinkStub != nil { fake.SetSelfLinkStub(arg1) } } @@ -1871,10 +1836,9 @@ func (fake *Instance) SetUID(arg1 types.UID) { fake.setUIDArgsForCall = append(fake.setUIDArgsForCall, struct { arg1 types.UID }{arg1}) - stub := fake.SetUIDStub fake.recordInvocation("SetUID", []interface{}{arg1}) fake.setUIDMutex.Unlock() - if stub != nil { + if fake.SetUIDStub != nil { fake.SetUIDStub(arg1) } } @@ -1903,16 +1867,15 @@ func (fake *Instance) UsingHSMProxy() bool { ret, specificReturn := fake.usingHSMProxyReturnsOnCall[len(fake.usingHSMProxyArgsForCall)] fake.usingHSMProxyArgsForCall = append(fake.usingHSMProxyArgsForCall, struct { }{}) - stub := fake.UsingHSMProxyStub - fakeReturns := fake.usingHSMProxyReturns fake.recordInvocation("UsingHSMProxy", []interface{}{}) fake.usingHSMProxyMutex.Unlock() - if stub != nil { - return stub() + if fake.UsingHSMProxyStub != nil { + return fake.UsingHSMProxyStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.usingHSMProxyReturns return fakeReturns.result1 } diff --git a/pkg/initializer/orderer/mocks/ibporderer.go b/pkg/initializer/orderer/mocks/ibporderer.go index 5b30ae11..e8775f41 100644 --- a/pkg/initializer/orderer/mocks/ibporderer.go +++ b/pkg/initializer/orderer/mocks/ibporderer.go @@ -51,16 +51,15 @@ func (fake *IBPOrderer) GenerateCrypto() (*config.CryptoResponse, error) { ret, specificReturn := fake.generateCryptoReturnsOnCall[len(fake.generateCryptoArgsForCall)] fake.generateCryptoArgsForCall = append(fake.generateCryptoArgsForCall, struct { }{}) - stub := fake.GenerateCryptoStub - fakeReturns := fake.generateCryptoReturns fake.recordInvocation("GenerateCrypto", []interface{}{}) fake.generateCryptoMutex.Unlock() - if stub != nil { - return stub() + if fake.GenerateCryptoStub != nil { + return fake.GenerateCryptoStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.generateCryptoReturns return fakeReturns.result1, fakeReturns.result2 } @@ -107,16 +106,15 @@ func (fake *IBPOrderer) GetConfig() initializer.OrdererConfig { ret, specificReturn := fake.getConfigReturnsOnCall[len(fake.getConfigArgsForCall)] fake.getConfigArgsForCall = append(fake.getConfigArgsForCall, struct { }{}) - stub := fake.GetConfigStub - fakeReturns := fake.getConfigReturns fake.recordInvocation("GetConfig", []interface{}{}) fake.getConfigMutex.Unlock() - if stub != nil { - return stub() + if fake.GetConfigStub != nil { + return fake.GetConfigStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getConfigReturns return fakeReturns.result1 } @@ -161,16 +159,15 @@ func (fake *IBPOrderer) OverrideConfig(arg1 initializer.OrdererConfig) error { fake.overrideConfigArgsForCall = append(fake.overrideConfigArgsForCall, struct { arg1 initializer.OrdererConfig }{arg1}) - stub := fake.OverrideConfigStub - fakeReturns := fake.overrideConfigReturns fake.recordInvocation("OverrideConfig", []interface{}{arg1}) fake.overrideConfigMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.OverrideConfigStub != nil { + return fake.OverrideConfigStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.overrideConfigReturns return fakeReturns.result1 } diff --git a/pkg/initializer/peer/mocks/client.go b/pkg/initializer/peer/mocks/client.go index ee14505d..d028b255 100644 --- a/pkg/initializer/peer/mocks/client.go +++ b/pkg/initializer/peer/mocks/client.go @@ -142,16 +142,15 @@ func (fake *Client) Create(arg1 context.Context, arg2 client.Object, arg3 ...con arg2 client.Object arg3 []controllerclient.CreateOption }{arg1, arg2, arg3}) - stub := fake.CreateStub - fakeReturns := fake.createReturns fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3}) fake.createMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.CreateStub != nil { + return fake.CreateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.createReturns return fakeReturns.result1 } @@ -205,16 +204,15 @@ func (fake *Client) CreateOrUpdate(arg1 context.Context, arg2 client.Object, arg arg2 client.Object arg3 []controllerclient.CreateOrUpdateOption }{arg1, arg2, arg3}) - stub := fake.CreateOrUpdateStub - fakeReturns := fake.createOrUpdateReturns fake.recordInvocation("CreateOrUpdate", []interface{}{arg1, arg2, arg3}) fake.createOrUpdateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.CreateOrUpdateStub != nil { + return fake.CreateOrUpdateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.createOrUpdateReturns return fakeReturns.result1 } @@ -268,16 +266,15 @@ func (fake *Client) Delete(arg1 context.Context, arg2 client.Object, arg3 ...cli arg2 client.Object arg3 []client.DeleteOption }{arg1, arg2, arg3}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1, arg2, arg3}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -331,16 +328,15 @@ func (fake *Client) Get(arg1 context.Context, arg2 types.NamespacedName, arg3 cl arg2 types.NamespacedName arg3 client.Object }{arg1, arg2, arg3}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1, arg2, arg3}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GetStub != nil { + return fake.GetStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.getReturns return fakeReturns.result1 } @@ -394,16 +390,15 @@ func (fake *Client) List(arg1 context.Context, arg2 client.ObjectList, arg3 ...c arg2 client.ObjectList arg3 []client.ListOption }{arg1, arg2, arg3}) - stub := fake.ListStub - fakeReturns := fake.listReturns fake.recordInvocation("List", []interface{}{arg1, arg2, arg3}) fake.listMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.ListStub != nil { + return fake.ListStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.listReturns return fakeReturns.result1 } @@ -458,16 +453,15 @@ func (fake *Client) Patch(arg1 context.Context, arg2 client.Object, arg3 client. arg3 client.Patch arg4 []controllerclient.PatchOption }{arg1, arg2, arg3, arg4}) - stub := fake.PatchStub - fakeReturns := fake.patchReturns fake.recordInvocation("Patch", []interface{}{arg1, arg2, arg3, arg4}) fake.patchMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) + if fake.PatchStub != nil { + return fake.PatchStub(arg1, arg2, arg3, arg4...) } if specificReturn { return ret.result1 } + fakeReturns := fake.patchReturns return fakeReturns.result1 } @@ -522,16 +516,15 @@ func (fake *Client) PatchStatus(arg1 context.Context, arg2 client.Object, arg3 c arg3 client.Patch arg4 []controllerclient.PatchOption }{arg1, arg2, arg3, arg4}) - stub := fake.PatchStatusStub - fakeReturns := fake.patchStatusReturns fake.recordInvocation("PatchStatus", []interface{}{arg1, arg2, arg3, arg4}) fake.patchStatusMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) + if fake.PatchStatusStub != nil { + return fake.PatchStatusStub(arg1, arg2, arg3, arg4...) } if specificReturn { return ret.result1 } + fakeReturns := fake.patchStatusReturns return fakeReturns.result1 } @@ -585,16 +578,15 @@ func (fake *Client) Update(arg1 context.Context, arg2 client.Object, arg3 ...con arg2 client.Object arg3 []controllerclient.UpdateOption }{arg1, arg2, arg3}) - stub := fake.UpdateStub - fakeReturns := fake.updateReturns fake.recordInvocation("Update", []interface{}{arg1, arg2, arg3}) fake.updateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.UpdateStub != nil { + return fake.UpdateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateReturns return fakeReturns.result1 } @@ -648,16 +640,15 @@ func (fake *Client) UpdateStatus(arg1 context.Context, arg2 client.Object, arg3 arg2 client.Object arg3 []client.UpdateOption }{arg1, arg2, arg3}) - stub := fake.UpdateStatusStub - fakeReturns := fake.updateStatusReturns fake.recordInvocation("UpdateStatus", []interface{}{arg1, arg2, arg3}) fake.updateStatusMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.UpdateStatusStub != nil { + return fake.UpdateStatusStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateStatusReturns return fakeReturns.result1 } diff --git a/pkg/initializer/peer/mocks/ibppeer.go b/pkg/initializer/peer/mocks/ibppeer.go index eaf751a3..b13a34ae 100644 --- a/pkg/initializer/peer/mocks/ibppeer.go +++ b/pkg/initializer/peer/mocks/ibppeer.go @@ -61,16 +61,15 @@ func (fake *IBPPeer) DeliveryClientCrypto() map[string][]byte { ret, specificReturn := fake.deliveryClientCryptoReturnsOnCall[len(fake.deliveryClientCryptoArgsForCall)] fake.deliveryClientCryptoArgsForCall = append(fake.deliveryClientCryptoArgsForCall, struct { }{}) - stub := fake.DeliveryClientCryptoStub - fakeReturns := fake.deliveryClientCryptoReturns fake.recordInvocation("DeliveryClientCrypto", []interface{}{}) fake.deliveryClientCryptoMutex.Unlock() - if stub != nil { - return stub() + if fake.DeliveryClientCryptoStub != nil { + return fake.DeliveryClientCryptoStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.deliveryClientCryptoReturns return fakeReturns.result1 } @@ -114,16 +113,15 @@ func (fake *IBPPeer) GenerateCrypto() (*config.CryptoResponse, error) { ret, specificReturn := fake.generateCryptoReturnsOnCall[len(fake.generateCryptoArgsForCall)] fake.generateCryptoArgsForCall = append(fake.generateCryptoArgsForCall, struct { }{}) - stub := fake.GenerateCryptoStub - fakeReturns := fake.generateCryptoReturns fake.recordInvocation("GenerateCrypto", []interface{}{}) fake.generateCryptoMutex.Unlock() - if stub != nil { - return stub() + if fake.GenerateCryptoStub != nil { + return fake.GenerateCryptoStub() } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.generateCryptoReturns return fakeReturns.result1, fakeReturns.result2 } @@ -170,16 +168,15 @@ func (fake *IBPPeer) GetConfig() initializer.CoreConfig { ret, specificReturn := fake.getConfigReturnsOnCall[len(fake.getConfigArgsForCall)] fake.getConfigArgsForCall = append(fake.getConfigArgsForCall, struct { }{}) - stub := fake.GetConfigStub - fakeReturns := fake.getConfigReturns fake.recordInvocation("GetConfig", []interface{}{}) fake.getConfigMutex.Unlock() - if stub != nil { - return stub() + if fake.GetConfigStub != nil { + return fake.GetConfigStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getConfigReturns return fakeReturns.result1 } @@ -224,16 +221,15 @@ func (fake *IBPPeer) OverrideConfig(arg1 initializer.CoreConfig) error { fake.overrideConfigArgsForCall = append(fake.overrideConfigArgsForCall, struct { arg1 initializer.CoreConfig }{arg1}) - stub := fake.OverrideConfigStub - fakeReturns := fake.overrideConfigReturns fake.recordInvocation("OverrideConfig", []interface{}{arg1}) fake.overrideConfigMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.OverrideConfigStub != nil { + return fake.OverrideConfigStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.overrideConfigReturns return fakeReturns.result1 } diff --git a/pkg/manager/resources/job/mocks/client.go b/pkg/manager/resources/job/mocks/client.go index ee14505d..d028b255 100644 --- a/pkg/manager/resources/job/mocks/client.go +++ b/pkg/manager/resources/job/mocks/client.go @@ -142,16 +142,15 @@ func (fake *Client) Create(arg1 context.Context, arg2 client.Object, arg3 ...con arg2 client.Object arg3 []controllerclient.CreateOption }{arg1, arg2, arg3}) - stub := fake.CreateStub - fakeReturns := fake.createReturns fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3}) fake.createMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.CreateStub != nil { + return fake.CreateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.createReturns return fakeReturns.result1 } @@ -205,16 +204,15 @@ func (fake *Client) CreateOrUpdate(arg1 context.Context, arg2 client.Object, arg arg2 client.Object arg3 []controllerclient.CreateOrUpdateOption }{arg1, arg2, arg3}) - stub := fake.CreateOrUpdateStub - fakeReturns := fake.createOrUpdateReturns fake.recordInvocation("CreateOrUpdate", []interface{}{arg1, arg2, arg3}) fake.createOrUpdateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.CreateOrUpdateStub != nil { + return fake.CreateOrUpdateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.createOrUpdateReturns return fakeReturns.result1 } @@ -268,16 +266,15 @@ func (fake *Client) Delete(arg1 context.Context, arg2 client.Object, arg3 ...cli arg2 client.Object arg3 []client.DeleteOption }{arg1, arg2, arg3}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1, arg2, arg3}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -331,16 +328,15 @@ func (fake *Client) Get(arg1 context.Context, arg2 types.NamespacedName, arg3 cl arg2 types.NamespacedName arg3 client.Object }{arg1, arg2, arg3}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1, arg2, arg3}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GetStub != nil { + return fake.GetStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.getReturns return fakeReturns.result1 } @@ -394,16 +390,15 @@ func (fake *Client) List(arg1 context.Context, arg2 client.ObjectList, arg3 ...c arg2 client.ObjectList arg3 []client.ListOption }{arg1, arg2, arg3}) - stub := fake.ListStub - fakeReturns := fake.listReturns fake.recordInvocation("List", []interface{}{arg1, arg2, arg3}) fake.listMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.ListStub != nil { + return fake.ListStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.listReturns return fakeReturns.result1 } @@ -458,16 +453,15 @@ func (fake *Client) Patch(arg1 context.Context, arg2 client.Object, arg3 client. arg3 client.Patch arg4 []controllerclient.PatchOption }{arg1, arg2, arg3, arg4}) - stub := fake.PatchStub - fakeReturns := fake.patchReturns fake.recordInvocation("Patch", []interface{}{arg1, arg2, arg3, arg4}) fake.patchMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) + if fake.PatchStub != nil { + return fake.PatchStub(arg1, arg2, arg3, arg4...) } if specificReturn { return ret.result1 } + fakeReturns := fake.patchReturns return fakeReturns.result1 } @@ -522,16 +516,15 @@ func (fake *Client) PatchStatus(arg1 context.Context, arg2 client.Object, arg3 c arg3 client.Patch arg4 []controllerclient.PatchOption }{arg1, arg2, arg3, arg4}) - stub := fake.PatchStatusStub - fakeReturns := fake.patchStatusReturns fake.recordInvocation("PatchStatus", []interface{}{arg1, arg2, arg3, arg4}) fake.patchStatusMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4...) + if fake.PatchStatusStub != nil { + return fake.PatchStatusStub(arg1, arg2, arg3, arg4...) } if specificReturn { return ret.result1 } + fakeReturns := fake.patchStatusReturns return fakeReturns.result1 } @@ -585,16 +578,15 @@ func (fake *Client) Update(arg1 context.Context, arg2 client.Object, arg3 ...con arg2 client.Object arg3 []controllerclient.UpdateOption }{arg1, arg2, arg3}) - stub := fake.UpdateStub - fakeReturns := fake.updateReturns fake.recordInvocation("Update", []interface{}{arg1, arg2, arg3}) fake.updateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.UpdateStub != nil { + return fake.UpdateStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateReturns return fakeReturns.result1 } @@ -648,16 +640,15 @@ func (fake *Client) UpdateStatus(arg1 context.Context, arg2 client.Object, arg3 arg2 client.Object arg3 []client.UpdateOption }{arg1, arg2, arg3}) - stub := fake.UpdateStatusStub - fakeReturns := fake.updateStatusReturns fake.recordInvocation("UpdateStatus", []interface{}{arg1, arg2, arg3}) fake.updateStatusMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3...) + if fake.UpdateStatusStub != nil { + return fake.UpdateStatusStub(arg1, arg2, arg3...) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateStatusReturns return fakeReturns.result1 } diff --git a/pkg/manager/resources/mocks/resource_manager.go b/pkg/manager/resources/mocks/resource_manager.go index e09fd941..c44598ae 100644 --- a/pkg/manager/resources/mocks/resource_manager.go +++ b/pkg/manager/resources/mocks/resource_manager.go @@ -105,16 +105,15 @@ func (fake *ResourceManager) CheckState(arg1 v1.Object) error { fake.checkStateArgsForCall = append(fake.checkStateArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.CheckStateStub - fakeReturns := fake.checkStateReturns fake.recordInvocation("CheckState", []interface{}{arg1}) fake.checkStateMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.CheckStateStub != nil { + return fake.CheckStateStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.checkStateReturns return fakeReturns.result1 } @@ -166,16 +165,15 @@ func (fake *ResourceManager) Delete(arg1 v1.Object) error { fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -227,16 +225,15 @@ func (fake *ResourceManager) Exists(arg1 v1.Object) bool { fake.existsArgsForCall = append(fake.existsArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ExistsStub - fakeReturns := fake.existsReturns fake.recordInvocation("Exists", []interface{}{arg1}) fake.existsMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ExistsStub != nil { + return fake.ExistsStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.existsReturns return fakeReturns.result1 } @@ -288,16 +285,15 @@ func (fake *ResourceManager) Get(arg1 v1.Object) (client.Object, error) { fake.getArgsForCall = append(fake.getArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetStub != nil { + return fake.GetStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getReturns return fakeReturns.result1, fakeReturns.result2 } @@ -352,16 +348,15 @@ func (fake *ResourceManager) GetName(arg1 v1.Object) string { fake.getNameArgsForCall = append(fake.getNameArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.GetNameStub - fakeReturns := fake.getNameReturns fake.recordInvocation("GetName", []interface{}{arg1}) fake.getNameMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetNameStub != nil { + return fake.GetNameStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.getNameReturns return fakeReturns.result1 } @@ -414,16 +409,15 @@ func (fake *ResourceManager) Reconcile(arg1 v1.Object, arg2 bool) error { arg1 v1.Object arg2 bool }{arg1, arg2}) - stub := fake.ReconcileStub - fakeReturns := fake.reconcileReturns fake.recordInvocation("Reconcile", []interface{}{arg1, arg2}) fake.reconcileMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ReconcileStub != nil { + return fake.ReconcileStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.reconcileReturns return fakeReturns.result1 } @@ -475,16 +469,15 @@ func (fake *ResourceManager) RestoreState(arg1 v1.Object) error { fake.restoreStateArgsForCall = append(fake.restoreStateArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.RestoreStateStub - fakeReturns := fake.restoreStateReturns fake.recordInvocation("RestoreState", []interface{}{arg1}) fake.restoreStateMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.RestoreStateStub != nil { + return fake.RestoreStateStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.restoreStateReturns return fakeReturns.result1 } @@ -535,10 +528,9 @@ func (fake *ResourceManager) SetCustomName(arg1 string) { fake.setCustomNameArgsForCall = append(fake.setCustomNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetCustomNameStub fake.recordInvocation("SetCustomName", []interface{}{arg1}) fake.setCustomNameMutex.Unlock() - if stub != nil { + if fake.SetCustomNameStub != nil { fake.SetCustomNameStub(arg1) } } diff --git a/pkg/migrator/peer/fabric/mocks/migrator.go b/pkg/migrator/peer/fabric/mocks/migrator.go index 40c6f877..2aac1b23 100644 --- a/pkg/migrator/peer/fabric/mocks/migrator.go +++ b/pkg/migrator/peer/fabric/mocks/migrator.go @@ -66,16 +66,15 @@ func (fake *Migrator) MigrationNeeded(arg1 v1.Object) bool { fake.migrationNeededArgsForCall = append(fake.migrationNeededArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.MigrationNeededStub - fakeReturns := fake.migrationNeededReturns fake.recordInvocation("MigrationNeeded", []interface{}{arg1}) fake.migrationNeededMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.MigrationNeededStub != nil { + return fake.MigrationNeededStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.migrationNeededReturns return fakeReturns.result1 } @@ -127,16 +126,15 @@ func (fake *Migrator) SetChaincodeLauncherResourceOnCR(arg1 v1.Object) error { fake.setChaincodeLauncherResourceOnCRArgsForCall = append(fake.setChaincodeLauncherResourceOnCRArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.SetChaincodeLauncherResourceOnCRStub - fakeReturns := fake.setChaincodeLauncherResourceOnCRReturns fake.recordInvocation("SetChaincodeLauncherResourceOnCR", []interface{}{arg1}) fake.setChaincodeLauncherResourceOnCRMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.SetChaincodeLauncherResourceOnCRStub != nil { + return fake.SetChaincodeLauncherResourceOnCRStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.setChaincodeLauncherResourceOnCRReturns return fakeReturns.result1 } @@ -189,16 +187,15 @@ func (fake *Migrator) UpdateConfig(arg1 v1.Object, arg2 string) error { arg1 v1.Object arg2 string }{arg1, arg2}) - stub := fake.UpdateConfigStub - fakeReturns := fake.updateConfigReturns fake.recordInvocation("UpdateConfig", []interface{}{arg1, arg2}) fake.updateConfigMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.UpdateConfigStub != nil { + return fake.UpdateConfigStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateConfigReturns return fakeReturns.result1 } @@ -251,16 +248,15 @@ func (fake *Migrator) UpgradeDBs(arg1 v1.Object, arg2 operatorconfig.DBMigration arg1 v1.Object arg2 operatorconfig.DBMigrationTimeouts }{arg1, arg2}) - stub := fake.UpgradeDBsStub - fakeReturns := fake.upgradeDBsReturns fake.recordInvocation("UpgradeDBs", []interface{}{arg1, arg2}) fake.upgradeDBsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.UpgradeDBsStub != nil { + return fake.UpgradeDBsStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.upgradeDBsReturns return fakeReturns.result1 } diff --git a/pkg/migrator/peer/fabric/v2/mocks/configmapmanager.go b/pkg/migrator/peer/fabric/v2/mocks/configmapmanager.go index b13b1260..8ac39c70 100644 --- a/pkg/migrator/peer/fabric/v2/mocks/configmapmanager.go +++ b/pkg/migrator/peer/fabric/v2/mocks/configmapmanager.go @@ -47,16 +47,15 @@ func (fake *ConfigMapManager) CreateOrUpdate(arg1 *v1beta1.IBPPeer, arg2 initial arg1 *v1beta1.IBPPeer arg2 initializer.CoreConfig }{arg1, arg2}) - stub := fake.CreateOrUpdateStub - fakeReturns := fake.createOrUpdateReturns fake.recordInvocation("CreateOrUpdate", []interface{}{arg1, arg2}) fake.createOrUpdateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.CreateOrUpdateStub != nil { + return fake.CreateOrUpdateStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.createOrUpdateReturns return fakeReturns.result1 } @@ -108,16 +107,15 @@ func (fake *ConfigMapManager) GetCoreConfig(arg1 *v1beta1.IBPPeer) (*v1.ConfigMa fake.getCoreConfigArgsForCall = append(fake.getCoreConfigArgsForCall, struct { arg1 *v1beta1.IBPPeer }{arg1}) - stub := fake.GetCoreConfigStub - fakeReturns := fake.getCoreConfigReturns fake.recordInvocation("GetCoreConfig", []interface{}{arg1}) fake.getCoreConfigMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetCoreConfigStub != nil { + return fake.GetCoreConfigStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getCoreConfigReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/pkg/migrator/peer/fabric/v2/mocks/deploymentmanager.go b/pkg/migrator/peer/fabric/v2/mocks/deploymentmanager.go index 5165f3e1..7ee24af1 100644 --- a/pkg/migrator/peer/fabric/v2/mocks/deploymentmanager.go +++ b/pkg/migrator/peer/fabric/v2/mocks/deploymentmanager.go @@ -69,16 +69,15 @@ func (fake *DeploymentManager) Delete(arg1 v1.Object) error { fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -130,16 +129,15 @@ func (fake *DeploymentManager) DeploymentStatus(arg1 v1.Object) (v1a.DeploymentS fake.deploymentStatusArgsForCall = append(fake.deploymentStatusArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.DeploymentStatusStub - fakeReturns := fake.deploymentStatusReturns fake.recordInvocation("DeploymentStatus", []interface{}{arg1}) fake.deploymentStatusMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.DeploymentStatusStub != nil { + return fake.DeploymentStatusStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.deploymentStatusReturns return fakeReturns.result1, fakeReturns.result2 } @@ -194,16 +192,15 @@ func (fake *DeploymentManager) Get(arg1 v1.Object) (client.Object, error) { fake.getArgsForCall = append(fake.getArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetStub != nil { + return fake.GetStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getReturns return fakeReturns.result1, fakeReturns.result2 } @@ -257,16 +254,15 @@ func (fake *DeploymentManager) GetScheme() *runtime.Scheme { ret, specificReturn := fake.getSchemeReturnsOnCall[len(fake.getSchemeArgsForCall)] fake.getSchemeArgsForCall = append(fake.getSchemeArgsForCall, struct { }{}) - stub := fake.GetSchemeStub - fakeReturns := fake.getSchemeReturns fake.recordInvocation("GetScheme", []interface{}{}) fake.getSchemeMutex.Unlock() - if stub != nil { - return stub() + if fake.GetSchemeStub != nil { + return fake.GetSchemeStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getSchemeReturns return fakeReturns.result1 } diff --git a/pkg/migrator/peer/fabric/v2/peer_test.go b/pkg/migrator/peer/fabric/v2/peer_test.go index 239acd5f..bfb95510 100644 --- a/pkg/migrator/peer/fabric/v2/peer_test.go +++ b/pkg/migrator/peer/fabric/v2/peer_test.go @@ -86,9 +86,6 @@ var _ = Describe("V2 peer migrator", func() { v1.Container{ Name: "peer", }, - v1.Container{ - Name: "dind", - }, }, }, }, @@ -147,10 +144,6 @@ var _ = Describe("V2 peer migrator", func() { Expect(needed).To(Equal(true)) }) - It("returns true if deployment has dind container", func() { - needed := migrator.MigrationNeeded(instance) - Expect(needed).To(Equal(true)) - }) }) Context("upgrade dbs peer", func() { diff --git a/pkg/migrator/peer/fabric/v25/mocks/configmapmanager.go b/pkg/migrator/peer/fabric/v25/mocks/configmapmanager.go index 3b210036..4b936844 100644 --- a/pkg/migrator/peer/fabric/v25/mocks/configmapmanager.go +++ b/pkg/migrator/peer/fabric/v25/mocks/configmapmanager.go @@ -47,16 +47,15 @@ func (fake *ConfigMapManager) CreateOrUpdate(arg1 *v1beta1.IBPPeer, arg2 initial arg1 *v1beta1.IBPPeer arg2 initializer.CoreConfig }{arg1, arg2}) - stub := fake.CreateOrUpdateStub - fakeReturns := fake.createOrUpdateReturns fake.recordInvocation("CreateOrUpdate", []interface{}{arg1, arg2}) fake.createOrUpdateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.CreateOrUpdateStub != nil { + return fake.CreateOrUpdateStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.createOrUpdateReturns return fakeReturns.result1 } @@ -108,16 +107,15 @@ func (fake *ConfigMapManager) GetCoreConfig(arg1 *v1beta1.IBPPeer) (*v1.ConfigMa fake.getCoreConfigArgsForCall = append(fake.getCoreConfigArgsForCall, struct { arg1 *v1beta1.IBPPeer }{arg1}) - stub := fake.GetCoreConfigStub - fakeReturns := fake.getCoreConfigReturns fake.recordInvocation("GetCoreConfig", []interface{}{arg1}) fake.getCoreConfigMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetCoreConfigStub != nil { + return fake.GetCoreConfigStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getCoreConfigReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/pkg/migrator/peer/fabric/v25/mocks/deploymentmanager.go b/pkg/migrator/peer/fabric/v25/mocks/deploymentmanager.go index 1e8bc136..ab24e905 100644 --- a/pkg/migrator/peer/fabric/v25/mocks/deploymentmanager.go +++ b/pkg/migrator/peer/fabric/v25/mocks/deploymentmanager.go @@ -69,16 +69,15 @@ func (fake *DeploymentManager) Delete(arg1 v1.Object) error { fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -130,16 +129,15 @@ func (fake *DeploymentManager) DeploymentStatus(arg1 v1.Object) (v1a.DeploymentS fake.deploymentStatusArgsForCall = append(fake.deploymentStatusArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.DeploymentStatusStub - fakeReturns := fake.deploymentStatusReturns fake.recordInvocation("DeploymentStatus", []interface{}{arg1}) fake.deploymentStatusMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.DeploymentStatusStub != nil { + return fake.DeploymentStatusStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.deploymentStatusReturns return fakeReturns.result1, fakeReturns.result2 } @@ -194,16 +192,15 @@ func (fake *DeploymentManager) Get(arg1 v1.Object) (client.Object, error) { fake.getArgsForCall = append(fake.getArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetStub != nil { + return fake.GetStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getReturns return fakeReturns.result1, fakeReturns.result2 } @@ -257,16 +254,15 @@ func (fake *DeploymentManager) GetScheme() *runtime.Scheme { ret, specificReturn := fake.getSchemeReturnsOnCall[len(fake.getSchemeArgsForCall)] fake.getSchemeArgsForCall = append(fake.getSchemeArgsForCall, struct { }{}) - stub := fake.GetSchemeStub - fakeReturns := fake.getSchemeReturns fake.recordInvocation("GetScheme", []interface{}{}) fake.getSchemeMutex.Unlock() - if stub != nil { - return stub() + if fake.GetSchemeStub != nil { + return fake.GetSchemeStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getSchemeReturns return fakeReturns.result1 } diff --git a/pkg/migrator/peer/fabric/v25/peer_test.go b/pkg/migrator/peer/fabric/v25/peer_test.go index 67a6a839..3bc558ff 100644 --- a/pkg/migrator/peer/fabric/v25/peer_test.go +++ b/pkg/migrator/peer/fabric/v25/peer_test.go @@ -86,9 +86,6 @@ var _ = Describe("V2 peer migrator", func() { v1.Container{ Name: "peer", }, - v1.Container{ - Name: "dind", - }, }, }, }, @@ -147,10 +144,6 @@ var _ = Describe("V2 peer migrator", func() { Expect(needed).To(Equal(true)) }) - It("returns true if deployment has dind container", func() { - needed := migrator.MigrationNeeded(instance) - Expect(needed).To(Equal(true)) - }) }) Context("upgrade dbs peer", func() { diff --git a/pkg/offering/base/ca/mocks/certificate_manager.go b/pkg/offering/base/ca/mocks/certificate_manager.go index ed6c5c3a..5c5d7c9f 100644 --- a/pkg/offering/base/ca/mocks/certificate_manager.go +++ b/pkg/offering/base/ca/mocks/certificate_manager.go @@ -86,16 +86,15 @@ func (fake *CertificateManager) Expires(arg1 []byte, arg2 int64) (bool, time.Tim arg1 []byte arg2 int64 }{arg1Copy, arg2}) - stub := fake.ExpiresStub - fakeReturns := fake.expiresReturns fake.recordInvocation("Expires", []interface{}{arg1Copy, arg2}) fake.expiresMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ExpiresStub != nil { + return fake.ExpiresStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2, ret.result3 } + fakeReturns := fake.expiresReturns return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 } @@ -161,16 +160,15 @@ func (fake *CertificateManager) GetDurationToNextRenewalForCert(arg1 string, arg arg3 v1.Object arg4 int64 }{arg1, arg2Copy, arg3, arg4}) - stub := fake.GetDurationToNextRenewalForCertStub - fakeReturns := fake.getDurationToNextRenewalForCertReturns fake.recordInvocation("GetDurationToNextRenewalForCert", []interface{}{arg1, arg2Copy, arg3, arg4}) fake.getDurationToNextRenewalForCertMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4) + if fake.GetDurationToNextRenewalForCertStub != nil { + return fake.GetDurationToNextRenewalForCertStub(arg1, arg2, arg3, arg4) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getDurationToNextRenewalForCertReturns return fakeReturns.result1, fakeReturns.result2 } @@ -226,16 +224,15 @@ func (fake *CertificateManager) GetSecret(arg1 string, arg2 string) (*v1a.Secret arg1 string arg2 string }{arg1, arg2}) - stub := fake.GetSecretStub - fakeReturns := fake.getSecretReturns fake.recordInvocation("GetSecret", []interface{}{arg1, arg2}) fake.getSecretMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.GetSecretStub != nil { + return fake.GetSecretStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getSecretReturns return fakeReturns.result1, fakeReturns.result2 } @@ -292,16 +289,15 @@ func (fake *CertificateManager) UpdateSecret(arg1 v1.Object, arg2 string, arg3 m arg2 string arg3 map[string][]byte }{arg1, arg2, arg3}) - stub := fake.UpdateSecretStub - fakeReturns := fake.updateSecretReturns fake.recordInvocation("UpdateSecret", []interface{}{arg1, arg2, arg3}) fake.updateSecretMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.UpdateSecretStub != nil { + return fake.UpdateSecretStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateSecretReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/ca/mocks/initialize.go b/pkg/offering/base/ca/mocks/initialize.go index 8f0f35b7..a1340945 100644 --- a/pkg/offering/base/ca/mocks/initialize.go +++ b/pkg/offering/base/ca/mocks/initialize.go @@ -105,16 +105,15 @@ func (fake *InitializeIBPCA) CreateOrUpdateConfigMap(arg1 *v1beta1.IBPCA, arg2 m arg2 map[string][]byte arg3 string }{arg1, arg2, arg3}) - stub := fake.CreateOrUpdateConfigMapStub - fakeReturns := fake.createOrUpdateConfigMapReturns fake.recordInvocation("CreateOrUpdateConfigMap", []interface{}{arg1, arg2, arg3}) fake.createOrUpdateConfigMapMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.CreateOrUpdateConfigMapStub != nil { + return fake.CreateOrUpdateConfigMapStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.createOrUpdateConfigMapReturns return fakeReturns.result1 } @@ -169,16 +168,15 @@ func (fake *InitializeIBPCA) HandleConfigResources(arg1 string, arg2 *v1beta1.IB arg3 *initializer.Response arg4 baseca.Update }{arg1, arg2, arg3, arg4}) - stub := fake.HandleConfigResourcesStub - fakeReturns := fake.handleConfigResourcesReturns fake.recordInvocation("HandleConfigResources", []interface{}{arg1, arg2, arg3, arg4}) fake.handleConfigResourcesMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4) + if fake.HandleConfigResourcesStub != nil { + return fake.HandleConfigResourcesStub(arg1, arg2, arg3, arg4) } if specificReturn { return ret.result1 } + fakeReturns := fake.handleConfigResourcesReturns return fakeReturns.result1 } @@ -231,16 +229,15 @@ func (fake *InitializeIBPCA) HandleEnrollmentCAInit(arg1 *v1beta1.IBPCA, arg2 ba arg1 *v1beta1.IBPCA arg2 baseca.Update }{arg1, arg2}) - stub := fake.HandleEnrollmentCAInitStub - fakeReturns := fake.handleEnrollmentCAInitReturns fake.recordInvocation("HandleEnrollmentCAInit", []interface{}{arg1, arg2}) fake.handleEnrollmentCAInitMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.HandleEnrollmentCAInitStub != nil { + return fake.HandleEnrollmentCAInitStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.handleEnrollmentCAInitReturns return fakeReturns.result1, fakeReturns.result2 } @@ -296,16 +293,15 @@ func (fake *InitializeIBPCA) HandleTLSCAInit(arg1 *v1beta1.IBPCA, arg2 baseca.Up arg1 *v1beta1.IBPCA arg2 baseca.Update }{arg1, arg2}) - stub := fake.HandleTLSCAInitStub - fakeReturns := fake.handleTLSCAInitReturns fake.recordInvocation("HandleTLSCAInit", []interface{}{arg1, arg2}) fake.handleTLSCAInitMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.HandleTLSCAInitStub != nil { + return fake.HandleTLSCAInitStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.handleTLSCAInitReturns return fakeReturns.result1, fakeReturns.result2 } @@ -361,16 +357,15 @@ func (fake *InitializeIBPCA) ReadConfigMap(arg1 *v1beta1.IBPCA, arg2 string) (*v arg1 *v1beta1.IBPCA arg2 string }{arg1, arg2}) - stub := fake.ReadConfigMapStub - fakeReturns := fake.readConfigMapReturns fake.recordInvocation("ReadConfigMap", []interface{}{arg1, arg2}) fake.readConfigMapMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ReadConfigMapStub != nil { + return fake.ReadConfigMapStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.readConfigMapReturns return fakeReturns.result1, fakeReturns.result2 } @@ -425,16 +420,15 @@ func (fake *InitializeIBPCA) SyncDBConfig(arg1 *v1beta1.IBPCA) (*v1beta1.IBPCA, fake.syncDBConfigArgsForCall = append(fake.syncDBConfigArgsForCall, struct { arg1 *v1beta1.IBPCA }{arg1}) - stub := fake.SyncDBConfigStub - fakeReturns := fake.syncDBConfigReturns fake.recordInvocation("SyncDBConfig", []interface{}{arg1}) fake.syncDBConfigMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.SyncDBConfigStub != nil { + return fake.SyncDBConfigStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.syncDBConfigReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/pkg/offering/base/ca/mocks/initializer.go b/pkg/offering/base/ca/mocks/initializer.go index 74611c2e..57753971 100644 --- a/pkg/offering/base/ca/mocks/initializer.go +++ b/pkg/offering/base/ca/mocks/initializer.go @@ -53,16 +53,15 @@ func (fake *Initializer) Create(arg1 *v1beta1.IBPCA, arg2 *v1.ServerConfig, arg3 arg2 *v1.ServerConfig arg3 initializer.IBPCA }{arg1, arg2, arg3}) - stub := fake.CreateStub - fakeReturns := fake.createReturns fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3}) fake.createMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.CreateStub != nil { + return fake.CreateStub(arg1, arg2, arg3) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.createReturns return fakeReturns.result1, fakeReturns.result2 } @@ -119,16 +118,15 @@ func (fake *Initializer) Update(arg1 *v1beta1.IBPCA, arg2 *v1.ServerConfig, arg3 arg2 *v1.ServerConfig arg3 initializer.IBPCA }{arg1, arg2, arg3}) - stub := fake.UpdateStub - fakeReturns := fake.updateReturns fake.recordInvocation("Update", []interface{}{arg1, arg2, arg3}) fake.updateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.UpdateStub != nil { + return fake.UpdateStub(arg1, arg2, arg3) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.updateReturns return fakeReturns.result1, fakeReturns.result2 } diff --git a/pkg/offering/base/ca/mocks/restart_manager.go b/pkg/offering/base/ca/mocks/restart_manager.go index 175b6373..f28daec0 100644 --- a/pkg/offering/base/ca/mocks/restart_manager.go +++ b/pkg/offering/base/ca/mocks/restart_manager.go @@ -64,16 +64,15 @@ func (fake *RestartManager) ForConfigOverride(arg1 v1.Object) error { fake.forConfigOverrideArgsForCall = append(fake.forConfigOverrideArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForConfigOverrideStub - fakeReturns := fake.forConfigOverrideReturns fake.recordInvocation("ForConfigOverride", []interface{}{arg1}) fake.forConfigOverrideMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForConfigOverrideStub != nil { + return fake.ForConfigOverrideStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forConfigOverrideReturns return fakeReturns.result1 } @@ -125,16 +124,15 @@ func (fake *RestartManager) ForRestartAction(arg1 v1.Object) error { fake.forRestartActionArgsForCall = append(fake.forRestartActionArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForRestartActionStub - fakeReturns := fake.forRestartActionReturns fake.recordInvocation("ForRestartAction", []interface{}{arg1}) fake.forRestartActionMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForRestartActionStub != nil { + return fake.ForRestartActionStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forRestartActionReturns return fakeReturns.result1 } @@ -186,16 +184,15 @@ func (fake *RestartManager) ForTLSReenroll(arg1 v1.Object) error { fake.forTLSReenrollArgsForCall = append(fake.forTLSReenrollArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForTLSReenrollStub - fakeReturns := fake.forTLSReenrollReturns fake.recordInvocation("ForTLSReenroll", []interface{}{arg1}) fake.forTLSReenrollMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForTLSReenrollStub != nil { + return fake.ForTLSReenrollStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forTLSReenrollReturns return fakeReturns.result1 } @@ -247,16 +244,15 @@ func (fake *RestartManager) TriggerIfNeeded(arg1 restart.Instance) error { fake.triggerIfNeededArgsForCall = append(fake.triggerIfNeededArgsForCall, struct { arg1 restart.Instance }{arg1}) - stub := fake.TriggerIfNeededStub - fakeReturns := fake.triggerIfNeededReturns fake.recordInvocation("TriggerIfNeeded", []interface{}{arg1}) fake.triggerIfNeededMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.TriggerIfNeededStub != nil { + return fake.TriggerIfNeededStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.triggerIfNeededReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/ca/mocks/update.go b/pkg/offering/base/ca/mocks/update.go index 4ac87ff9..66ec9dcb 100644 --- a/pkg/offering/base/ca/mocks/update.go +++ b/pkg/offering/base/ca/mocks/update.go @@ -127,16 +127,15 @@ func (fake *Update) CACryptoCreated() bool { ret, specificReturn := fake.cACryptoCreatedReturnsOnCall[len(fake.cACryptoCreatedArgsForCall)] fake.cACryptoCreatedArgsForCall = append(fake.cACryptoCreatedArgsForCall, struct { }{}) - stub := fake.CACryptoCreatedStub - fakeReturns := fake.cACryptoCreatedReturns fake.recordInvocation("CACryptoCreated", []interface{}{}) fake.cACryptoCreatedMutex.Unlock() - if stub != nil { - return stub() + if fake.CACryptoCreatedStub != nil { + return fake.CACryptoCreatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.cACryptoCreatedReturns return fakeReturns.result1 } @@ -180,16 +179,15 @@ func (fake *Update) CACryptoUpdated() bool { ret, specificReturn := fake.cACryptoUpdatedReturnsOnCall[len(fake.cACryptoUpdatedArgsForCall)] fake.cACryptoUpdatedArgsForCall = append(fake.cACryptoUpdatedArgsForCall, struct { }{}) - stub := fake.CACryptoUpdatedStub - fakeReturns := fake.cACryptoUpdatedReturns fake.recordInvocation("CACryptoUpdated", []interface{}{}) fake.cACryptoUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.CACryptoUpdatedStub != nil { + return fake.CACryptoUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.cACryptoUpdatedReturns return fakeReturns.result1 } @@ -233,16 +231,15 @@ func (fake *Update) CAOverridesUpdated() bool { ret, specificReturn := fake.cAOverridesUpdatedReturnsOnCall[len(fake.cAOverridesUpdatedArgsForCall)] fake.cAOverridesUpdatedArgsForCall = append(fake.cAOverridesUpdatedArgsForCall, struct { }{}) - stub := fake.CAOverridesUpdatedStub - fakeReturns := fake.cAOverridesUpdatedReturns fake.recordInvocation("CAOverridesUpdated", []interface{}{}) fake.cAOverridesUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.CAOverridesUpdatedStub != nil { + return fake.CAOverridesUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.cAOverridesUpdatedReturns return fakeReturns.result1 } @@ -286,16 +283,15 @@ func (fake *Update) CATagUpdated() bool { ret, specificReturn := fake.cATagUpdatedReturnsOnCall[len(fake.cATagUpdatedArgsForCall)] fake.cATagUpdatedArgsForCall = append(fake.cATagUpdatedArgsForCall, struct { }{}) - stub := fake.CATagUpdatedStub - fakeReturns := fake.cATagUpdatedReturns fake.recordInvocation("CATagUpdated", []interface{}{}) fake.cATagUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.CATagUpdatedStub != nil { + return fake.CATagUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.cATagUpdatedReturns return fakeReturns.result1 } @@ -339,16 +335,15 @@ func (fake *Update) ConfigOverridesUpdated() bool { ret, specificReturn := fake.configOverridesUpdatedReturnsOnCall[len(fake.configOverridesUpdatedArgsForCall)] fake.configOverridesUpdatedArgsForCall = append(fake.configOverridesUpdatedArgsForCall, struct { }{}) - stub := fake.ConfigOverridesUpdatedStub - fakeReturns := fake.configOverridesUpdatedReturns fake.recordInvocation("ConfigOverridesUpdated", []interface{}{}) fake.configOverridesUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.ConfigOverridesUpdatedStub != nil { + return fake.ConfigOverridesUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.configOverridesUpdatedReturns return fakeReturns.result1 } @@ -392,16 +387,15 @@ func (fake *Update) FabricVersionUpdated() bool { ret, specificReturn := fake.fabricVersionUpdatedReturnsOnCall[len(fake.fabricVersionUpdatedArgsForCall)] fake.fabricVersionUpdatedArgsForCall = append(fake.fabricVersionUpdatedArgsForCall, struct { }{}) - stub := fake.FabricVersionUpdatedStub - fakeReturns := fake.fabricVersionUpdatedReturns fake.recordInvocation("FabricVersionUpdated", []interface{}{}) fake.fabricVersionUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.FabricVersionUpdatedStub != nil { + return fake.FabricVersionUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.fabricVersionUpdatedReturns return fakeReturns.result1 } @@ -445,16 +439,15 @@ func (fake *Update) ImagesUpdated() bool { ret, specificReturn := fake.imagesUpdatedReturnsOnCall[len(fake.imagesUpdatedArgsForCall)] fake.imagesUpdatedArgsForCall = append(fake.imagesUpdatedArgsForCall, struct { }{}) - stub := fake.ImagesUpdatedStub - fakeReturns := fake.imagesUpdatedReturns fake.recordInvocation("ImagesUpdated", []interface{}{}) fake.imagesUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.ImagesUpdatedStub != nil { + return fake.ImagesUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.imagesUpdatedReturns return fakeReturns.result1 } @@ -498,16 +491,15 @@ func (fake *Update) RenewTLSCert() bool { ret, specificReturn := fake.renewTLSCertReturnsOnCall[len(fake.renewTLSCertArgsForCall)] fake.renewTLSCertArgsForCall = append(fake.renewTLSCertArgsForCall, struct { }{}) - stub := fake.RenewTLSCertStub - fakeReturns := fake.renewTLSCertReturns fake.recordInvocation("RenewTLSCert", []interface{}{}) fake.renewTLSCertMutex.Unlock() - if stub != nil { - return stub() + if fake.RenewTLSCertStub != nil { + return fake.RenewTLSCertStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.renewTLSCertReturns return fakeReturns.result1 } @@ -551,16 +543,15 @@ func (fake *Update) RestartNeeded() bool { ret, specificReturn := fake.restartNeededReturnsOnCall[len(fake.restartNeededArgsForCall)] fake.restartNeededArgsForCall = append(fake.restartNeededArgsForCall, struct { }{}) - stub := fake.RestartNeededStub - fakeReturns := fake.restartNeededReturns fake.recordInvocation("RestartNeeded", []interface{}{}) fake.restartNeededMutex.Unlock() - if stub != nil { - return stub() + if fake.RestartNeededStub != nil { + return fake.RestartNeededStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.restartNeededReturns return fakeReturns.result1 } @@ -604,16 +595,15 @@ func (fake *Update) SpecUpdated() bool { ret, specificReturn := fake.specUpdatedReturnsOnCall[len(fake.specUpdatedArgsForCall)] fake.specUpdatedArgsForCall = append(fake.specUpdatedArgsForCall, struct { }{}) - stub := fake.SpecUpdatedStub - fakeReturns := fake.specUpdatedReturns fake.recordInvocation("SpecUpdated", []interface{}{}) fake.specUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.SpecUpdatedStub != nil { + return fake.SpecUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.specUpdatedReturns return fakeReturns.result1 } @@ -657,16 +647,15 @@ func (fake *Update) TLSCAOverridesUpdated() bool { ret, specificReturn := fake.tLSCAOverridesUpdatedReturnsOnCall[len(fake.tLSCAOverridesUpdatedArgsForCall)] fake.tLSCAOverridesUpdatedArgsForCall = append(fake.tLSCAOverridesUpdatedArgsForCall, struct { }{}) - stub := fake.TLSCAOverridesUpdatedStub - fakeReturns := fake.tLSCAOverridesUpdatedReturns fake.recordInvocation("TLSCAOverridesUpdated", []interface{}{}) fake.tLSCAOverridesUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.TLSCAOverridesUpdatedStub != nil { + return fake.TLSCAOverridesUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.tLSCAOverridesUpdatedReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/console/mocks/restart_manager.go b/pkg/offering/base/console/mocks/restart_manager.go index 8086c3e7..0cfac1dc 100644 --- a/pkg/offering/base/console/mocks/restart_manager.go +++ b/pkg/offering/base/console/mocks/restart_manager.go @@ -53,16 +53,15 @@ func (fake *RestartManager) ForConfigMapUpdate(arg1 v1.Object) error { fake.forConfigMapUpdateArgsForCall = append(fake.forConfigMapUpdateArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForConfigMapUpdateStub - fakeReturns := fake.forConfigMapUpdateReturns fake.recordInvocation("ForConfigMapUpdate", []interface{}{arg1}) fake.forConfigMapUpdateMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForConfigMapUpdateStub != nil { + return fake.ForConfigMapUpdateStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forConfigMapUpdateReturns return fakeReturns.result1 } @@ -114,16 +113,15 @@ func (fake *RestartManager) ForRestartAction(arg1 v1.Object) error { fake.forRestartActionArgsForCall = append(fake.forRestartActionArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForRestartActionStub - fakeReturns := fake.forRestartActionReturns fake.recordInvocation("ForRestartAction", []interface{}{arg1}) fake.forRestartActionMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForRestartActionStub != nil { + return fake.ForRestartActionStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forRestartActionReturns return fakeReturns.result1 } @@ -175,16 +173,15 @@ func (fake *RestartManager) TriggerIfNeeded(arg1 restart.Instance) error { fake.triggerIfNeededArgsForCall = append(fake.triggerIfNeededArgsForCall, struct { arg1 restart.Instance }{arg1}) - stub := fake.TriggerIfNeededStub - fakeReturns := fake.triggerIfNeededReturns fake.recordInvocation("TriggerIfNeeded", []interface{}{arg1}) fake.triggerIfNeededMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.TriggerIfNeededStub != nil { + return fake.TriggerIfNeededStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.triggerIfNeededReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/console/mocks/update.go b/pkg/offering/base/console/mocks/update.go index fcac5c0c..3abcc63e 100644 --- a/pkg/offering/base/console/mocks/update.go +++ b/pkg/offering/base/console/mocks/update.go @@ -67,16 +67,15 @@ func (fake *Update) ConsoleCMUpdated() bool { ret, specificReturn := fake.consoleCMUpdatedReturnsOnCall[len(fake.consoleCMUpdatedArgsForCall)] fake.consoleCMUpdatedArgsForCall = append(fake.consoleCMUpdatedArgsForCall, struct { }{}) - stub := fake.ConsoleCMUpdatedStub - fakeReturns := fake.consoleCMUpdatedReturns fake.recordInvocation("ConsoleCMUpdated", []interface{}{}) fake.consoleCMUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.ConsoleCMUpdatedStub != nil { + return fake.ConsoleCMUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.consoleCMUpdatedReturns return fakeReturns.result1 } @@ -120,16 +119,15 @@ func (fake *Update) DeployerCMUpdated() bool { ret, specificReturn := fake.deployerCMUpdatedReturnsOnCall[len(fake.deployerCMUpdatedArgsForCall)] fake.deployerCMUpdatedArgsForCall = append(fake.deployerCMUpdatedArgsForCall, struct { }{}) - stub := fake.DeployerCMUpdatedStub - fakeReturns := fake.deployerCMUpdatedReturns fake.recordInvocation("DeployerCMUpdated", []interface{}{}) fake.deployerCMUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.DeployerCMUpdatedStub != nil { + return fake.DeployerCMUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.deployerCMUpdatedReturns return fakeReturns.result1 } @@ -173,16 +171,15 @@ func (fake *Update) EnvCMUpdated() bool { ret, specificReturn := fake.envCMUpdatedReturnsOnCall[len(fake.envCMUpdatedArgsForCall)] fake.envCMUpdatedArgsForCall = append(fake.envCMUpdatedArgsForCall, struct { }{}) - stub := fake.EnvCMUpdatedStub - fakeReturns := fake.envCMUpdatedReturns fake.recordInvocation("EnvCMUpdated", []interface{}{}) fake.envCMUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.EnvCMUpdatedStub != nil { + return fake.EnvCMUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.envCMUpdatedReturns return fakeReturns.result1 } @@ -226,16 +223,15 @@ func (fake *Update) RestartNeeded() bool { ret, specificReturn := fake.restartNeededReturnsOnCall[len(fake.restartNeededArgsForCall)] fake.restartNeededArgsForCall = append(fake.restartNeededArgsForCall, struct { }{}) - stub := fake.RestartNeededStub - fakeReturns := fake.restartNeededReturns fake.recordInvocation("RestartNeeded", []interface{}{}) fake.restartNeededMutex.Unlock() - if stub != nil { - return stub() + if fake.RestartNeededStub != nil { + return fake.RestartNeededStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.restartNeededReturns return fakeReturns.result1 } @@ -279,16 +275,15 @@ func (fake *Update) SpecUpdated() bool { ret, specificReturn := fake.specUpdatedReturnsOnCall[len(fake.specUpdatedArgsForCall)] fake.specUpdatedArgsForCall = append(fake.specUpdatedArgsForCall, struct { }{}) - stub := fake.SpecUpdatedStub - fakeReturns := fake.specUpdatedReturns fake.recordInvocation("SpecUpdated", []interface{}{}) fake.specUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.SpecUpdatedStub != nil { + return fake.SpecUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.specUpdatedReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/console/override/deployercm_test.go b/pkg/offering/base/console/override/deployercm_test.go index a0b0cee0..faa7538b 100644 --- a/pkg/offering/base/console/override/deployercm_test.go +++ b/pkg/offering/base/console/override/deployercm_test.go @@ -86,8 +86,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { PeerInitTag: "1.0.0", PeerImage: "peer-image", PeerTag: "1.0.0", - DindImage: "dind-iamge", - DindTag: "1.0.0", GRPCWebImage: "grpcweb-image", GRPCWebTag: "1.0.0", CouchDBImage: "couchdb-image", @@ -102,8 +100,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { PeerInitTag: "2.0.0", PeerImage: "peer-image", PeerTag: "2.0.0", - DindImage: "dind-iamge", - DindTag: "2.0.0", GRPCWebImage: "grpcweb-image", GRPCWebTag: "2.0.0", CouchDBImage: "couchdb-image", @@ -234,8 +230,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { PeerInitTag: "1.0.0", PeerImage: "peer-image", PeerTag: "1.0.0", - DindImage: "dind-iamge", - DindTag: "1.0.0", GRPCWebImage: "grpcweb-image", GRPCWebTag: "1.0.0", CouchDBImage: "couchdb-image", @@ -250,8 +244,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { PeerInitTag: "2.0.0", PeerImage: "peer-image", PeerTag: "2.0.0", - DindImage: "dind-iamge", - DindTag: "2.0.0", GRPCWebImage: "grpcweb-image", GRPCWebTag: "2.0.0", CouchDBImage: "couchdb-image", @@ -363,8 +355,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { PeerInitTag: "1.0.0", PeerImage: "ghcr.io/ibm-blockchain/peer-image", PeerTag: "1.0.0", - DindImage: "ghcr.io/ibm-blockchain/dind-iamge", - DindTag: "1.0.0", GRPCWebImage: "ghcr.io/ibm-blockchain/grpcweb-image", GRPCWebTag: "1.0.0", CouchDBImage: "ghcr.io/ibm-blockchain/couchdb-image", @@ -408,8 +398,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { PeerInitTag: "1.0.0-amd64", PeerImage: "ghcr.io/ibm-blockchain/peer-image", PeerTag: "1.0.0-amd64", - DindImage: "ghcr.io/ibm-blockchain/dind-iamge", - DindTag: "1.0.0-amd64", GRPCWebImage: "ghcr.io/ibm-blockchain/grpcweb-image", GRPCWebTag: "1.0.0-amd64", CouchDBImage: "ghcr.io/ibm-blockchain/couchdb-image", @@ -452,9 +440,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { PeerImage: "peer-image", PeerTag: "1.0.0", PeerDigest: "", - DindImage: "dind-iamge", - DindTag: "1.0.0", - DindDigest: "", GRPCWebImage: "grpcweb-image", GRPCWebTag: "1.0.0", GRPCWebDigest: "", @@ -510,8 +495,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { Expect(config.Versions.Peer["1.4"].Image.PeerInitTag).To(Equal(expectedVersions.Peer["1.4"].Image.PeerInitTag)) Expect(config.Versions.Peer["1.4"].Image.PeerImage).To(Equal(expectedVersions.Peer["1.4"].Image.PeerImage)) Expect(config.Versions.Peer["1.4"].Image.PeerTag).To(Equal(expectedVersions.Peer["1.4"].Image.PeerTag)) - Expect(config.Versions.Peer["1.4"].Image.DindImage).To(Equal(expectedVersions.Peer["1.4"].Image.DindImage)) - Expect(config.Versions.Peer["1.4"].Image.DindTag).To(Equal(expectedVersions.Peer["1.4"].Image.DindTag)) Expect(config.Versions.Peer["1.4"].Image.CouchDBImage).To(Equal(expectedVersions.Peer["1.4"].Image.CouchDBImage)) Expect(config.Versions.Peer["1.4"].Image.CouchDBTag).To(Equal(expectedVersions.Peer["1.4"].Image.CouchDBTag)) Expect(config.Versions.Peer["1.4"].Image.GRPCWebImage).To(Equal(expectedVersions.Peer["1.4"].Image.GRPCWebImage)) @@ -553,8 +536,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { PeerInitTag: "1.0.0", PeerImage: "peer-image", PeerTag: "1.0.0", - DindImage: "dind-iamge", - DindTag: "1.0.0", GRPCWebImage: "grpcweb-image", GRPCWebTag: "1.0.0", CouchDBImage: "couchdb-image", @@ -598,8 +579,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { PeerInitTag: "1.0.0-amd64", PeerImage: "ghcr.io/ibm-blockchain/peer-image", PeerTag: "1.0.0-amd64", - DindImage: "ghcr.io/ibm-blockchain/dind-iamge", - DindTag: "1.0.0-amd64", GRPCWebImage: "ghcr.io/ibm-blockchain/grpcweb-image", GRPCWebTag: "1.0.0-amd64", CouchDBImage: "ghcr.io/ibm-blockchain/couchdb-image", @@ -642,9 +621,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { PeerImage: "peer-image", PeerTag: "1.0.0", PeerDigest: "", - DindImage: "dind-iamge", - DindTag: "1.0.0", - DindDigest: "", GRPCWebImage: "grpcweb-image", GRPCWebTag: "1.0.0", GRPCWebDigest: "", @@ -700,8 +676,6 @@ var _ = Describe("Base Console Deployer Config Map Overrides", func() { Expect(config.Versions.Peer["1.4"].Image.PeerInitTag).To(Equal(expectedVersions.Peer["1.4"].Image.PeerInitTag)) Expect(config.Versions.Peer["1.4"].Image.PeerImage).To(Equal(expectedVersions.Peer["1.4"].Image.PeerImage)) Expect(config.Versions.Peer["1.4"].Image.PeerTag).To(Equal(expectedVersions.Peer["1.4"].Image.PeerTag)) - Expect(config.Versions.Peer["1.4"].Image.DindImage).To(Equal(expectedVersions.Peer["1.4"].Image.DindImage)) - Expect(config.Versions.Peer["1.4"].Image.DindTag).To(Equal(expectedVersions.Peer["1.4"].Image.DindTag)) Expect(config.Versions.Peer["1.4"].Image.CouchDBImage).To(Equal(expectedVersions.Peer["1.4"].Image.CouchDBImage)) Expect(config.Versions.Peer["1.4"].Image.CouchDBTag).To(Equal(expectedVersions.Peer["1.4"].Image.CouchDBTag)) Expect(config.Versions.Peer["1.4"].Image.GRPCWebImage).To(Equal(expectedVersions.Peer["1.4"].Image.GRPCWebImage)) diff --git a/pkg/offering/base/orderer/mocks/certificate_manager.go b/pkg/offering/base/orderer/mocks/certificate_manager.go index ca071dde..894b889b 100644 --- a/pkg/offering/base/orderer/mocks/certificate_manager.go +++ b/pkg/offering/base/orderer/mocks/certificate_manager.go @@ -87,16 +87,15 @@ func (fake *CertificateManager) CheckCertificatesForExpire(arg1 v1.Object, arg2 arg1 v1.Object arg2 int64 }{arg1, arg2}) - stub := fake.CheckCertificatesForExpireStub - fakeReturns := fake.checkCertificatesForExpireReturns fake.recordInvocation("CheckCertificatesForExpire", []interface{}{arg1, arg2}) fake.checkCertificatesForExpireMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.CheckCertificatesForExpireStub != nil { + return fake.CheckCertificatesForExpireStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2, ret.result3 } + fakeReturns := fake.checkCertificatesForExpireReturns return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 } @@ -156,16 +155,15 @@ func (fake *CertificateManager) GetDurationToNextRenewal(arg1 common.SecretType, arg2 v1.Object arg3 int64 }{arg1, arg2, arg3}) - stub := fake.GetDurationToNextRenewalStub - fakeReturns := fake.getDurationToNextRenewalReturns fake.recordInvocation("GetDurationToNextRenewal", []interface{}{arg1, arg2, arg3}) fake.getDurationToNextRenewalMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GetDurationToNextRenewalStub != nil { + return fake.GetDurationToNextRenewalStub(arg1, arg2, arg3) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getDurationToNextRenewalReturns return fakeReturns.result1, fakeReturns.result2 } @@ -221,16 +219,15 @@ func (fake *CertificateManager) GetSignCert(arg1 string, arg2 string) ([]byte, e arg1 string arg2 string }{arg1, arg2}) - stub := fake.GetSignCertStub - fakeReturns := fake.getSignCertReturns fake.recordInvocation("GetSignCert", []interface{}{arg1, arg2}) fake.getSignCertMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.GetSignCertStub != nil { + return fake.GetSignCertStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getSignCertReturns return fakeReturns.result1, fakeReturns.result2 } @@ -291,16 +288,15 @@ func (fake *CertificateManager) RenewCert(arg1 common.SecretType, arg2 certifica arg6 bool arg7 bool }{arg1, arg2, arg3, arg4, arg5, arg6, arg7}) - stub := fake.RenewCertStub - fakeReturns := fake.renewCertReturns fake.recordInvocation("RenewCert", []interface{}{arg1, arg2, arg3, arg4, arg5, arg6, arg7}) fake.renewCertMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4, arg5, arg6, arg7) + if fake.RenewCertStub != nil { + return fake.RenewCertStub(arg1, arg2, arg3, arg4, arg5, arg6, arg7) } if specificReturn { return ret.result1 } + fakeReturns := fake.renewCertReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/orderer/mocks/deployment_manager.go b/pkg/offering/base/orderer/mocks/deployment_manager.go index 287278d3..c8fc389c 100644 --- a/pkg/offering/base/orderer/mocks/deployment_manager.go +++ b/pkg/offering/base/orderer/mocks/deployment_manager.go @@ -121,16 +121,15 @@ func (fake *DeploymentManager) CheckForSecretChange(arg1 v1.Object, arg2 string, arg2 string arg3 func(string, *v1a.Deployment) bool }{arg1, arg2, arg3}) - stub := fake.CheckForSecretChangeStub - fakeReturns := fake.checkForSecretChangeReturns fake.recordInvocation("CheckForSecretChange", []interface{}{arg1, arg2, arg3}) fake.checkForSecretChangeMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.CheckForSecretChangeStub != nil { + return fake.CheckForSecretChangeStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.checkForSecretChangeReturns return fakeReturns.result1 } @@ -182,16 +181,15 @@ func (fake *DeploymentManager) CheckState(arg1 v1.Object) error { fake.checkStateArgsForCall = append(fake.checkStateArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.CheckStateStub - fakeReturns := fake.checkStateReturns fake.recordInvocation("CheckState", []interface{}{arg1}) fake.checkStateMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.CheckStateStub != nil { + return fake.CheckStateStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.checkStateReturns return fakeReturns.result1 } @@ -243,16 +241,15 @@ func (fake *DeploymentManager) Delete(arg1 v1.Object) error { fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -304,16 +301,15 @@ func (fake *DeploymentManager) Exists(arg1 v1.Object) bool { fake.existsArgsForCall = append(fake.existsArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ExistsStub - fakeReturns := fake.existsReturns fake.recordInvocation("Exists", []interface{}{arg1}) fake.existsMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ExistsStub != nil { + return fake.ExistsStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.existsReturns return fakeReturns.result1 } @@ -365,16 +361,15 @@ func (fake *DeploymentManager) Get(arg1 v1.Object) (client.Object, error) { fake.getArgsForCall = append(fake.getArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetStub != nil { + return fake.GetStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getReturns return fakeReturns.result1, fakeReturns.result2 } @@ -429,16 +424,15 @@ func (fake *DeploymentManager) GetName(arg1 v1.Object) string { fake.getNameArgsForCall = append(fake.getNameArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.GetNameStub - fakeReturns := fake.getNameReturns fake.recordInvocation("GetName", []interface{}{arg1}) fake.getNameMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetNameStub != nil { + return fake.GetNameStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.getNameReturns return fakeReturns.result1 } @@ -491,16 +485,15 @@ func (fake *DeploymentManager) Reconcile(arg1 v1.Object, arg2 bool) error { arg1 v1.Object arg2 bool }{arg1, arg2}) - stub := fake.ReconcileStub - fakeReturns := fake.reconcileReturns fake.recordInvocation("Reconcile", []interface{}{arg1, arg2}) fake.reconcileMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ReconcileStub != nil { + return fake.ReconcileStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.reconcileReturns return fakeReturns.result1 } @@ -552,16 +545,15 @@ func (fake *DeploymentManager) RestoreState(arg1 v1.Object) error { fake.restoreStateArgsForCall = append(fake.restoreStateArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.RestoreStateStub - fakeReturns := fake.restoreStateReturns fake.recordInvocation("RestoreState", []interface{}{arg1}) fake.restoreStateMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.RestoreStateStub != nil { + return fake.RestoreStateStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.restoreStateReturns return fakeReturns.result1 } @@ -612,10 +604,9 @@ func (fake *DeploymentManager) SetCustomName(arg1 string) { fake.setCustomNameArgsForCall = append(fake.setCustomNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetCustomNameStub fake.recordInvocation("SetCustomName", []interface{}{arg1}) fake.setCustomNameMutex.Unlock() - if stub != nil { + if fake.SetCustomNameStub != nil { fake.SetCustomNameStub(arg1) } } diff --git a/pkg/offering/base/orderer/mocks/initializeibporderer.go b/pkg/offering/base/orderer/mocks/initializeibporderer.go index b5f6baab..91002066 100644 --- a/pkg/offering/base/orderer/mocks/initializeibporderer.go +++ b/pkg/offering/base/orderer/mocks/initializeibporderer.go @@ -241,16 +241,15 @@ func (fake *InitializeIBPOrderer) CheckIfAdminCertsUpdated(arg1 *v1beta1.IBPOrde fake.checkIfAdminCertsUpdatedArgsForCall = append(fake.checkIfAdminCertsUpdatedArgsForCall, struct { arg1 *v1beta1.IBPOrderer }{arg1}) - stub := fake.CheckIfAdminCertsUpdatedStub - fakeReturns := fake.checkIfAdminCertsUpdatedReturns fake.recordInvocation("CheckIfAdminCertsUpdated", []interface{}{arg1}) fake.checkIfAdminCertsUpdatedMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.CheckIfAdminCertsUpdatedStub != nil { + return fake.CheckIfAdminCertsUpdatedStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.checkIfAdminCertsUpdatedReturns return fakeReturns.result1, fakeReturns.result2 } @@ -307,16 +306,15 @@ func (fake *InitializeIBPOrderer) Create(arg1 initializer.OrdererConfig, arg2 in arg2 initializer.IBPOrderer arg3 string }{arg1, arg2, arg3}) - stub := fake.CreateStub - fakeReturns := fake.createReturns fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3}) fake.createMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.CreateStub != nil { + return fake.CreateStub(arg1, arg2, arg3) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.createReturns return fakeReturns.result1, fakeReturns.result2 } @@ -372,16 +370,15 @@ func (fake *InitializeIBPOrderer) CreateOrUpdateConfigMap(arg1 *v1beta1.IBPOrder arg1 *v1beta1.IBPOrderer arg2 initializer.OrdererConfig }{arg1, arg2}) - stub := fake.CreateOrUpdateConfigMapStub - fakeReturns := fake.createOrUpdateConfigMapReturns fake.recordInvocation("CreateOrUpdateConfigMap", []interface{}{arg1, arg2}) fake.createOrUpdateConfigMapMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.CreateOrUpdateConfigMapStub != nil { + return fake.CreateOrUpdateConfigMapStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.createOrUpdateConfigMapReturns return fakeReturns.result1 } @@ -433,16 +430,15 @@ func (fake *InitializeIBPOrderer) Delete(arg1 *v1beta1.IBPOrderer) error { fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { arg1 *v1beta1.IBPOrderer }{arg1}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -496,16 +492,15 @@ func (fake *InitializeIBPOrderer) GenerateSecrets(arg1 common.SecretType, arg2 * arg2 *v1beta1.IBPOrderer arg3 *config.Response }{arg1, arg2, arg3}) - stub := fake.GenerateSecretsStub - fakeReturns := fake.generateSecretsReturns fake.recordInvocation("GenerateSecrets", []interface{}{arg1, arg2, arg3}) fake.generateSecretsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GenerateSecretsStub != nil { + return fake.GenerateSecretsStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.generateSecretsReturns return fakeReturns.result1 } @@ -558,16 +553,15 @@ func (fake *InitializeIBPOrderer) GenerateSecretsFromResponse(arg1 *v1beta1.IBPO arg1 *v1beta1.IBPOrderer arg2 *config.CryptoResponse }{arg1, arg2}) - stub := fake.GenerateSecretsFromResponseStub - fakeReturns := fake.generateSecretsFromResponseReturns fake.recordInvocation("GenerateSecretsFromResponse", []interface{}{arg1, arg2}) fake.generateSecretsFromResponseMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.GenerateSecretsFromResponseStub != nil { + return fake.GenerateSecretsFromResponseStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.generateSecretsFromResponseReturns return fakeReturns.result1 } @@ -619,16 +613,15 @@ func (fake *InitializeIBPOrderer) GetConfigFromConfigMap(arg1 *v1beta1.IBPOrdere fake.getConfigFromConfigMapArgsForCall = append(fake.getConfigFromConfigMapArgsForCall, struct { arg1 *v1beta1.IBPOrderer }{arg1}) - stub := fake.GetConfigFromConfigMapStub - fakeReturns := fake.getConfigFromConfigMapReturns fake.recordInvocation("GetConfigFromConfigMap", []interface{}{arg1}) fake.getConfigFromConfigMapMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetConfigFromConfigMapStub != nil { + return fake.GetConfigFromConfigMapStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getConfigFromConfigMapReturns return fakeReturns.result1, fakeReturns.result2 } @@ -689,16 +682,15 @@ func (fake *InitializeIBPOrderer) GetCoreConfigFromBytes(arg1 *v1beta1.IBPOrdere arg1 *v1beta1.IBPOrderer arg2 []byte }{arg1, arg2Copy}) - stub := fake.GetCoreConfigFromBytesStub - fakeReturns := fake.getCoreConfigFromBytesReturns fake.recordInvocation("GetCoreConfigFromBytes", []interface{}{arg1, arg2Copy}) fake.getCoreConfigFromBytesMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.GetCoreConfigFromBytesStub != nil { + return fake.GetCoreConfigFromBytesStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getCoreConfigFromBytesReturns return fakeReturns.result1, fakeReturns.result2 } @@ -754,16 +746,15 @@ func (fake *InitializeIBPOrderer) GetCoreConfigFromFile(arg1 *v1beta1.IBPOrderer arg1 *v1beta1.IBPOrderer arg2 string }{arg1, arg2}) - stub := fake.GetCoreConfigFromFileStub - fakeReturns := fake.getCoreConfigFromFileReturns fake.recordInvocation("GetCoreConfigFromFile", []interface{}{arg1, arg2}) fake.getCoreConfigFromFileMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.GetCoreConfigFromFileStub != nil { + return fake.GetCoreConfigFromFileStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getCoreConfigFromFileReturns return fakeReturns.result1, fakeReturns.result2 } @@ -818,16 +809,15 @@ func (fake *InitializeIBPOrderer) GetCrypto(arg1 *v1beta1.IBPOrderer) (*config.C fake.getCryptoArgsForCall = append(fake.getCryptoArgsForCall, struct { arg1 *v1beta1.IBPOrderer }{arg1}) - stub := fake.GetCryptoStub - fakeReturns := fake.getCryptoReturns fake.recordInvocation("GetCrypto", []interface{}{arg1}) fake.getCryptoMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetCryptoStub != nil { + return fake.GetCryptoStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getCryptoReturns return fakeReturns.result1, fakeReturns.result2 } @@ -883,16 +873,15 @@ func (fake *InitializeIBPOrderer) GetInitOrderer(arg1 *v1beta1.IBPOrderer, arg2 arg1 *v1beta1.IBPOrderer arg2 string }{arg1, arg2}) - stub := fake.GetInitOrdererStub - fakeReturns := fake.getInitOrdererReturns fake.recordInvocation("GetInitOrderer", []interface{}{arg1, arg2}) fake.getInitOrdererMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.GetInitOrdererStub != nil { + return fake.GetInitOrdererStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getInitOrdererReturns return fakeReturns.result1, fakeReturns.result2 } @@ -947,16 +936,15 @@ func (fake *InitializeIBPOrderer) GetUpdatedOrderer(arg1 *v1beta1.IBPOrderer) (* fake.getUpdatedOrdererArgsForCall = append(fake.getUpdatedOrdererArgsForCall, struct { arg1 *v1beta1.IBPOrderer }{arg1}) - stub := fake.GetUpdatedOrdererStub - fakeReturns := fake.getUpdatedOrdererReturns fake.recordInvocation("GetUpdatedOrderer", []interface{}{arg1}) fake.getUpdatedOrdererMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetUpdatedOrdererStub != nil { + return fake.GetUpdatedOrdererStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getUpdatedOrdererReturns return fakeReturns.result1, fakeReturns.result2 } @@ -1011,16 +999,15 @@ func (fake *InitializeIBPOrderer) MissingCrypto(arg1 *v1beta1.IBPOrderer) bool { fake.missingCryptoArgsForCall = append(fake.missingCryptoArgsForCall, struct { arg1 *v1beta1.IBPOrderer }{arg1}) - stub := fake.MissingCryptoStub - fakeReturns := fake.missingCryptoReturns fake.recordInvocation("MissingCrypto", []interface{}{arg1}) fake.missingCryptoMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.MissingCryptoStub != nil { + return fake.MissingCryptoStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.missingCryptoReturns return fakeReturns.result1 } @@ -1073,16 +1060,15 @@ func (fake *InitializeIBPOrderer) Update(arg1 initializer.OrdererConfig, arg2 in arg1 initializer.OrdererConfig arg2 initializer.IBPOrderer }{arg1, arg2}) - stub := fake.UpdateStub - fakeReturns := fake.updateReturns fake.recordInvocation("Update", []interface{}{arg1, arg2}) fake.updateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.UpdateStub != nil { + return fake.UpdateStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.updateReturns return fakeReturns.result1, fakeReturns.result2 } @@ -1137,16 +1123,15 @@ func (fake *InitializeIBPOrderer) UpdateAdminSecret(arg1 *v1beta1.IBPOrderer) er fake.updateAdminSecretArgsForCall = append(fake.updateAdminSecretArgsForCall, struct { arg1 *v1beta1.IBPOrderer }{arg1}) - stub := fake.UpdateAdminSecretStub - fakeReturns := fake.updateAdminSecretReturns fake.recordInvocation("UpdateAdminSecret", []interface{}{arg1}) fake.updateAdminSecretMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.UpdateAdminSecretStub != nil { + return fake.UpdateAdminSecretStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateAdminSecretReturns return fakeReturns.result1 } @@ -1200,16 +1185,15 @@ func (fake *InitializeIBPOrderer) UpdateSecrets(arg1 common.SecretType, arg2 *v1 arg2 *v1beta1.IBPOrderer arg3 *config.Response }{arg1, arg2, arg3}) - stub := fake.UpdateSecretsStub - fakeReturns := fake.updateSecretsReturns fake.recordInvocation("UpdateSecrets", []interface{}{arg1, arg2, arg3}) fake.updateSecretsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.UpdateSecretsStub != nil { + return fake.UpdateSecretsStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateSecretsReturns return fakeReturns.result1 } @@ -1262,16 +1246,15 @@ func (fake *InitializeIBPOrderer) UpdateSecretsFromResponse(arg1 *v1beta1.IBPOrd arg1 *v1beta1.IBPOrderer arg2 *config.CryptoResponse }{arg1, arg2}) - stub := fake.UpdateSecretsFromResponseStub - fakeReturns := fake.updateSecretsFromResponseReturns fake.recordInvocation("UpdateSecretsFromResponse", []interface{}{arg1, arg2}) fake.updateSecretsFromResponseMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.UpdateSecretsFromResponseStub != nil { + return fake.UpdateSecretsFromResponseStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateSecretsFromResponseReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/orderer/mocks/node_manager.go b/pkg/offering/base/orderer/mocks/node_manager.go index 19f50a0c..60ff35e6 100644 --- a/pkg/offering/base/orderer/mocks/node_manager.go +++ b/pkg/offering/base/orderer/mocks/node_manager.go @@ -34,16 +34,15 @@ func (fake *NodeManager) GetNode(arg1 int, arg2 map[string]*time.Timer, arg3 bas arg2 map[string]*time.Timer arg3 baseorderer.RestartManager }{arg1, arg2, arg3}) - stub := fake.GetNodeStub - fakeReturns := fake.getNodeReturns fake.recordInvocation("GetNode", []interface{}{arg1, arg2, arg3}) fake.getNodeMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GetNodeStub != nil { + return fake.GetNodeStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.getNodeReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/orderer/mocks/restart_manager.go b/pkg/offering/base/orderer/mocks/restart_manager.go index 1262ac96..aa96405c 100644 --- a/pkg/offering/base/orderer/mocks/restart_manager.go +++ b/pkg/offering/base/orderer/mocks/restart_manager.go @@ -88,16 +88,15 @@ func (fake *RestartManager) ForAdminCertUpdate(arg1 v1.Object) error { fake.forAdminCertUpdateArgsForCall = append(fake.forAdminCertUpdateArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForAdminCertUpdateStub - fakeReturns := fake.forAdminCertUpdateReturns fake.recordInvocation("ForAdminCertUpdate", []interface{}{arg1}) fake.forAdminCertUpdateMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForAdminCertUpdateStub != nil { + return fake.ForAdminCertUpdateStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forAdminCertUpdateReturns return fakeReturns.result1 } @@ -150,16 +149,15 @@ func (fake *RestartManager) ForCertUpdate(arg1 common.SecretType, arg2 v1.Object arg1 common.SecretType arg2 v1.Object }{arg1, arg2}) - stub := fake.ForCertUpdateStub - fakeReturns := fake.forCertUpdateReturns fake.recordInvocation("ForCertUpdate", []interface{}{arg1, arg2}) fake.forCertUpdateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ForCertUpdateStub != nil { + return fake.ForCertUpdateStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.forCertUpdateReturns return fakeReturns.result1 } @@ -211,16 +209,15 @@ func (fake *RestartManager) ForConfigOverride(arg1 v1.Object) error { fake.forConfigOverrideArgsForCall = append(fake.forConfigOverrideArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForConfigOverrideStub - fakeReturns := fake.forConfigOverrideReturns fake.recordInvocation("ForConfigOverride", []interface{}{arg1}) fake.forConfigOverrideMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForConfigOverrideStub != nil { + return fake.ForConfigOverrideStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forConfigOverrideReturns return fakeReturns.result1 } @@ -272,16 +269,15 @@ func (fake *RestartManager) ForNodeOU(arg1 v1.Object) error { fake.forNodeOUArgsForCall = append(fake.forNodeOUArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForNodeOUStub - fakeReturns := fake.forNodeOUReturns fake.recordInvocation("ForNodeOU", []interface{}{arg1}) fake.forNodeOUMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForNodeOUStub != nil { + return fake.ForNodeOUStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forNodeOUReturns return fakeReturns.result1 } @@ -333,16 +329,15 @@ func (fake *RestartManager) ForRestartAction(arg1 v1.Object) error { fake.forRestartActionArgsForCall = append(fake.forRestartActionArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForRestartActionStub - fakeReturns := fake.forRestartActionReturns fake.recordInvocation("ForRestartAction", []interface{}{arg1}) fake.forRestartActionMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForRestartActionStub != nil { + return fake.ForRestartActionStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forRestartActionReturns return fakeReturns.result1 } @@ -394,16 +389,15 @@ func (fake *RestartManager) TriggerIfNeeded(arg1 restart.Instance) error { fake.triggerIfNeededArgsForCall = append(fake.triggerIfNeededArgsForCall, struct { arg1 restart.Instance }{arg1}) - stub := fake.TriggerIfNeededStub - fakeReturns := fake.triggerIfNeededReturns fake.recordInvocation("TriggerIfNeeded", []interface{}{arg1}) fake.triggerIfNeededMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.TriggerIfNeededStub != nil { + return fake.TriggerIfNeededStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.triggerIfNeededReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/orderer/mocks/update.go b/pkg/offering/base/orderer/mocks/update.go index fcc264f8..8f1b9b98 100644 --- a/pkg/offering/base/orderer/mocks/update.go +++ b/pkg/offering/base/orderer/mocks/update.go @@ -258,16 +258,15 @@ func (fake *Update) CertificateCreated() bool { ret, specificReturn := fake.certificateCreatedReturnsOnCall[len(fake.certificateCreatedArgsForCall)] fake.certificateCreatedArgsForCall = append(fake.certificateCreatedArgsForCall, struct { }{}) - stub := fake.CertificateCreatedStub - fakeReturns := fake.certificateCreatedReturns fake.recordInvocation("CertificateCreated", []interface{}{}) fake.certificateCreatedMutex.Unlock() - if stub != nil { - return stub() + if fake.CertificateCreatedStub != nil { + return fake.CertificateCreatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.certificateCreatedReturns return fakeReturns.result1 } @@ -311,16 +310,15 @@ func (fake *Update) CertificateUpdated() bool { ret, specificReturn := fake.certificateUpdatedReturnsOnCall[len(fake.certificateUpdatedArgsForCall)] fake.certificateUpdatedArgsForCall = append(fake.certificateUpdatedArgsForCall, struct { }{}) - stub := fake.CertificateUpdatedStub - fakeReturns := fake.certificateUpdatedReturns fake.recordInvocation("CertificateUpdated", []interface{}{}) fake.certificateUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.CertificateUpdatedStub != nil { + return fake.CertificateUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.certificateUpdatedReturns return fakeReturns.result1 } @@ -364,16 +362,15 @@ func (fake *Update) ConfigOverridesUpdated() bool { ret, specificReturn := fake.configOverridesUpdatedReturnsOnCall[len(fake.configOverridesUpdatedArgsForCall)] fake.configOverridesUpdatedArgsForCall = append(fake.configOverridesUpdatedArgsForCall, struct { }{}) - stub := fake.ConfigOverridesUpdatedStub - fakeReturns := fake.configOverridesUpdatedReturns fake.recordInvocation("ConfigOverridesUpdated", []interface{}{}) fake.configOverridesUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.ConfigOverridesUpdatedStub != nil { + return fake.ConfigOverridesUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.configOverridesUpdatedReturns return fakeReturns.result1 } @@ -417,16 +414,15 @@ func (fake *Update) CryptoBackupNeeded() bool { ret, specificReturn := fake.cryptoBackupNeededReturnsOnCall[len(fake.cryptoBackupNeededArgsForCall)] fake.cryptoBackupNeededArgsForCall = append(fake.cryptoBackupNeededArgsForCall, struct { }{}) - stub := fake.CryptoBackupNeededStub - fakeReturns := fake.cryptoBackupNeededReturns fake.recordInvocation("CryptoBackupNeeded", []interface{}{}) fake.cryptoBackupNeededMutex.Unlock() - if stub != nil { - return stub() + if fake.CryptoBackupNeededStub != nil { + return fake.CryptoBackupNeededStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.cryptoBackupNeededReturns return fakeReturns.result1 } @@ -470,16 +466,15 @@ func (fake *Update) DeploymentUpdated() bool { ret, specificReturn := fake.deploymentUpdatedReturnsOnCall[len(fake.deploymentUpdatedArgsForCall)] fake.deploymentUpdatedArgsForCall = append(fake.deploymentUpdatedArgsForCall, struct { }{}) - stub := fake.DeploymentUpdatedStub - fakeReturns := fake.deploymentUpdatedReturns fake.recordInvocation("DeploymentUpdated", []interface{}{}) fake.deploymentUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.DeploymentUpdatedStub != nil { + return fake.DeploymentUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.deploymentUpdatedReturns return fakeReturns.result1 } @@ -523,16 +518,15 @@ func (fake *Update) EcertEnroll() bool { ret, specificReturn := fake.ecertEnrollReturnsOnCall[len(fake.ecertEnrollArgsForCall)] fake.ecertEnrollArgsForCall = append(fake.ecertEnrollArgsForCall, struct { }{}) - stub := fake.EcertEnrollStub - fakeReturns := fake.ecertEnrollReturns fake.recordInvocation("EcertEnroll", []interface{}{}) fake.ecertEnrollMutex.Unlock() - if stub != nil { - return stub() + if fake.EcertEnrollStub != nil { + return fake.EcertEnrollStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.ecertEnrollReturns return fakeReturns.result1 } @@ -576,16 +570,15 @@ func (fake *Update) EcertNewKeyReenroll() bool { ret, specificReturn := fake.ecertNewKeyReenrollReturnsOnCall[len(fake.ecertNewKeyReenrollArgsForCall)] fake.ecertNewKeyReenrollArgsForCall = append(fake.ecertNewKeyReenrollArgsForCall, struct { }{}) - stub := fake.EcertNewKeyReenrollStub - fakeReturns := fake.ecertNewKeyReenrollReturns fake.recordInvocation("EcertNewKeyReenroll", []interface{}{}) fake.ecertNewKeyReenrollMutex.Unlock() - if stub != nil { - return stub() + if fake.EcertNewKeyReenrollStub != nil { + return fake.EcertNewKeyReenrollStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.ecertNewKeyReenrollReturns return fakeReturns.result1 } @@ -629,16 +622,15 @@ func (fake *Update) EcertReenrollNeeded() bool { ret, specificReturn := fake.ecertReenrollNeededReturnsOnCall[len(fake.ecertReenrollNeededArgsForCall)] fake.ecertReenrollNeededArgsForCall = append(fake.ecertReenrollNeededArgsForCall, struct { }{}) - stub := fake.EcertReenrollNeededStub - fakeReturns := fake.ecertReenrollNeededReturns fake.recordInvocation("EcertReenrollNeeded", []interface{}{}) fake.ecertReenrollNeededMutex.Unlock() - if stub != nil { - return stub() + if fake.EcertReenrollNeededStub != nil { + return fake.EcertReenrollNeededStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.ecertReenrollNeededReturns return fakeReturns.result1 } @@ -682,16 +674,15 @@ func (fake *Update) EcertUpdated() bool { ret, specificReturn := fake.ecertUpdatedReturnsOnCall[len(fake.ecertUpdatedArgsForCall)] fake.ecertUpdatedArgsForCall = append(fake.ecertUpdatedArgsForCall, struct { }{}) - stub := fake.EcertUpdatedStub - fakeReturns := fake.ecertUpdatedReturns fake.recordInvocation("EcertUpdated", []interface{}{}) fake.ecertUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.EcertUpdatedStub != nil { + return fake.EcertUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.ecertUpdatedReturns return fakeReturns.result1 } @@ -735,16 +726,15 @@ func (fake *Update) FabricVersionUpdated() bool { ret, specificReturn := fake.fabricVersionUpdatedReturnsOnCall[len(fake.fabricVersionUpdatedArgsForCall)] fake.fabricVersionUpdatedArgsForCall = append(fake.fabricVersionUpdatedArgsForCall, struct { }{}) - stub := fake.FabricVersionUpdatedStub - fakeReturns := fake.fabricVersionUpdatedReturns fake.recordInvocation("FabricVersionUpdated", []interface{}{}) fake.fabricVersionUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.FabricVersionUpdatedStub != nil { + return fake.FabricVersionUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.fabricVersionUpdatedReturns return fakeReturns.result1 } @@ -788,16 +778,15 @@ func (fake *Update) GetCreatedCertType() common.SecretType { ret, specificReturn := fake.getCreatedCertTypeReturnsOnCall[len(fake.getCreatedCertTypeArgsForCall)] fake.getCreatedCertTypeArgsForCall = append(fake.getCreatedCertTypeArgsForCall, struct { }{}) - stub := fake.GetCreatedCertTypeStub - fakeReturns := fake.getCreatedCertTypeReturns fake.recordInvocation("GetCreatedCertType", []interface{}{}) fake.getCreatedCertTypeMutex.Unlock() - if stub != nil { - return stub() + if fake.GetCreatedCertTypeStub != nil { + return fake.GetCreatedCertTypeStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getCreatedCertTypeReturns return fakeReturns.result1 } @@ -841,16 +830,15 @@ func (fake *Update) ImagesUpdated() bool { ret, specificReturn := fake.imagesUpdatedReturnsOnCall[len(fake.imagesUpdatedArgsForCall)] fake.imagesUpdatedArgsForCall = append(fake.imagesUpdatedArgsForCall, struct { }{}) - stub := fake.ImagesUpdatedStub - fakeReturns := fake.imagesUpdatedReturns fake.recordInvocation("ImagesUpdated", []interface{}{}) fake.imagesUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.ImagesUpdatedStub != nil { + return fake.ImagesUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.imagesUpdatedReturns return fakeReturns.result1 } @@ -894,16 +882,15 @@ func (fake *Update) MSPUpdated() bool { ret, specificReturn := fake.mSPUpdatedReturnsOnCall[len(fake.mSPUpdatedArgsForCall)] fake.mSPUpdatedArgsForCall = append(fake.mSPUpdatedArgsForCall, struct { }{}) - stub := fake.MSPUpdatedStub - fakeReturns := fake.mSPUpdatedReturns fake.recordInvocation("MSPUpdated", []interface{}{}) fake.mSPUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.MSPUpdatedStub != nil { + return fake.MSPUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.mSPUpdatedReturns return fakeReturns.result1 } @@ -947,16 +934,15 @@ func (fake *Update) MigrateToV2() bool { ret, specificReturn := fake.migrateToV2ReturnsOnCall[len(fake.migrateToV2ArgsForCall)] fake.migrateToV2ArgsForCall = append(fake.migrateToV2ArgsForCall, struct { }{}) - stub := fake.MigrateToV2Stub - fakeReturns := fake.migrateToV2Returns fake.recordInvocation("MigrateToV2", []interface{}{}) fake.migrateToV2Mutex.Unlock() - if stub != nil { - return stub() + if fake.MigrateToV2Stub != nil { + return fake.MigrateToV2Stub() } if specificReturn { return ret.result1 } + fakeReturns := fake.migrateToV2Returns return fakeReturns.result1 } @@ -1000,16 +986,15 @@ func (fake *Update) MigrateToV24() bool { ret, specificReturn := fake.migrateToV24ReturnsOnCall[len(fake.migrateToV24ArgsForCall)] fake.migrateToV24ArgsForCall = append(fake.migrateToV24ArgsForCall, struct { }{}) - stub := fake.MigrateToV24Stub - fakeReturns := fake.migrateToV24Returns fake.recordInvocation("MigrateToV24", []interface{}{}) fake.migrateToV24Mutex.Unlock() - if stub != nil { - return stub() + if fake.MigrateToV24Stub != nil { + return fake.MigrateToV24Stub() } if specificReturn { return ret.result1 } + fakeReturns := fake.migrateToV24Returns return fakeReturns.result1 } @@ -1053,16 +1038,15 @@ func (fake *Update) MigrateToV25() bool { ret, specificReturn := fake.migrateToV25ReturnsOnCall[len(fake.migrateToV25ArgsForCall)] fake.migrateToV25ArgsForCall = append(fake.migrateToV25ArgsForCall, struct { }{}) - stub := fake.MigrateToV25Stub - fakeReturns := fake.migrateToV25Returns fake.recordInvocation("MigrateToV25", []interface{}{}) fake.migrateToV25Mutex.Unlock() - if stub != nil { - return stub() + if fake.MigrateToV25Stub != nil { + return fake.MigrateToV25Stub() } if specificReturn { return ret.result1 } + fakeReturns := fake.migrateToV25Returns return fakeReturns.result1 } @@ -1106,16 +1090,15 @@ func (fake *Update) NodeOUUpdated() bool { ret, specificReturn := fake.nodeOUUpdatedReturnsOnCall[len(fake.nodeOUUpdatedArgsForCall)] fake.nodeOUUpdatedArgsForCall = append(fake.nodeOUUpdatedArgsForCall, struct { }{}) - stub := fake.NodeOUUpdatedStub - fakeReturns := fake.nodeOUUpdatedReturns fake.recordInvocation("NodeOUUpdated", []interface{}{}) fake.nodeOUUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.NodeOUUpdatedStub != nil { + return fake.NodeOUUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.nodeOUUpdatedReturns return fakeReturns.result1 } @@ -1159,16 +1142,15 @@ func (fake *Update) OrdererTagUpdated() bool { ret, specificReturn := fake.ordererTagUpdatedReturnsOnCall[len(fake.ordererTagUpdatedArgsForCall)] fake.ordererTagUpdatedArgsForCall = append(fake.ordererTagUpdatedArgsForCall, struct { }{}) - stub := fake.OrdererTagUpdatedStub - fakeReturns := fake.ordererTagUpdatedReturns fake.recordInvocation("OrdererTagUpdated", []interface{}{}) fake.ordererTagUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.OrdererTagUpdatedStub != nil { + return fake.OrdererTagUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.ordererTagUpdatedReturns return fakeReturns.result1 } @@ -1212,16 +1194,15 @@ func (fake *Update) RestartNeeded() bool { ret, specificReturn := fake.restartNeededReturnsOnCall[len(fake.restartNeededArgsForCall)] fake.restartNeededArgsForCall = append(fake.restartNeededArgsForCall, struct { }{}) - stub := fake.RestartNeededStub - fakeReturns := fake.restartNeededReturns fake.recordInvocation("RestartNeeded", []interface{}{}) fake.restartNeededMutex.Unlock() - if stub != nil { - return stub() + if fake.RestartNeededStub != nil { + return fake.RestartNeededStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.restartNeededReturns return fakeReturns.result1 } @@ -1265,16 +1246,15 @@ func (fake *Update) SpecUpdated() bool { ret, specificReturn := fake.specUpdatedReturnsOnCall[len(fake.specUpdatedArgsForCall)] fake.specUpdatedArgsForCall = append(fake.specUpdatedArgsForCall, struct { }{}) - stub := fake.SpecUpdatedStub - fakeReturns := fake.specUpdatedReturns fake.recordInvocation("SpecUpdated", []interface{}{}) fake.specUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.SpecUpdatedStub != nil { + return fake.SpecUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.specUpdatedReturns return fakeReturns.result1 } @@ -1318,16 +1298,15 @@ func (fake *Update) TLSCertUpdated() bool { ret, specificReturn := fake.tLSCertUpdatedReturnsOnCall[len(fake.tLSCertUpdatedArgsForCall)] fake.tLSCertUpdatedArgsForCall = append(fake.tLSCertUpdatedArgsForCall, struct { }{}) - stub := fake.TLSCertUpdatedStub - fakeReturns := fake.tLSCertUpdatedReturns fake.recordInvocation("TLSCertUpdated", []interface{}{}) fake.tLSCertUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.TLSCertUpdatedStub != nil { + return fake.TLSCertUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.tLSCertUpdatedReturns return fakeReturns.result1 } @@ -1371,16 +1350,15 @@ func (fake *Update) TLScertEnroll() bool { ret, specificReturn := fake.tLScertEnrollReturnsOnCall[len(fake.tLScertEnrollArgsForCall)] fake.tLScertEnrollArgsForCall = append(fake.tLScertEnrollArgsForCall, struct { }{}) - stub := fake.TLScertEnrollStub - fakeReturns := fake.tLScertEnrollReturns fake.recordInvocation("TLScertEnroll", []interface{}{}) fake.tLScertEnrollMutex.Unlock() - if stub != nil { - return stub() + if fake.TLScertEnrollStub != nil { + return fake.TLScertEnrollStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.tLScertEnrollReturns return fakeReturns.result1 } @@ -1424,16 +1402,15 @@ func (fake *Update) TLScertNewKeyReenroll() bool { ret, specificReturn := fake.tLScertNewKeyReenrollReturnsOnCall[len(fake.tLScertNewKeyReenrollArgsForCall)] fake.tLScertNewKeyReenrollArgsForCall = append(fake.tLScertNewKeyReenrollArgsForCall, struct { }{}) - stub := fake.TLScertNewKeyReenrollStub - fakeReturns := fake.tLScertNewKeyReenrollReturns fake.recordInvocation("TLScertNewKeyReenroll", []interface{}{}) fake.tLScertNewKeyReenrollMutex.Unlock() - if stub != nil { - return stub() + if fake.TLScertNewKeyReenrollStub != nil { + return fake.TLScertNewKeyReenrollStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.tLScertNewKeyReenrollReturns return fakeReturns.result1 } @@ -1477,16 +1454,15 @@ func (fake *Update) TLScertReenrollNeeded() bool { ret, specificReturn := fake.tLScertReenrollNeededReturnsOnCall[len(fake.tLScertReenrollNeededArgsForCall)] fake.tLScertReenrollNeededArgsForCall = append(fake.tLScertReenrollNeededArgsForCall, struct { }{}) - stub := fake.TLScertReenrollNeededStub - fakeReturns := fake.tLScertReenrollNeededReturns fake.recordInvocation("TLScertReenrollNeeded", []interface{}{}) fake.tLScertReenrollNeededMutex.Unlock() - if stub != nil { - return stub() + if fake.TLScertReenrollNeededStub != nil { + return fake.TLScertReenrollNeededStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.tLScertReenrollNeededReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/peer/mocks/certificate_manager.go b/pkg/offering/base/peer/mocks/certificate_manager.go index be80fa05..472a3d08 100644 --- a/pkg/offering/base/peer/mocks/certificate_manager.go +++ b/pkg/offering/base/peer/mocks/certificate_manager.go @@ -87,16 +87,15 @@ func (fake *CertificateManager) CheckCertificatesForExpire(arg1 v1.Object, arg2 arg1 v1.Object arg2 int64 }{arg1, arg2}) - stub := fake.CheckCertificatesForExpireStub - fakeReturns := fake.checkCertificatesForExpireReturns fake.recordInvocation("CheckCertificatesForExpire", []interface{}{arg1, arg2}) fake.checkCertificatesForExpireMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.CheckCertificatesForExpireStub != nil { + return fake.CheckCertificatesForExpireStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2, ret.result3 } + fakeReturns := fake.checkCertificatesForExpireReturns return fakeReturns.result1, fakeReturns.result2, fakeReturns.result3 } @@ -156,16 +155,15 @@ func (fake *CertificateManager) GetDurationToNextRenewal(arg1 common.SecretType, arg2 v1.Object arg3 int64 }{arg1, arg2, arg3}) - stub := fake.GetDurationToNextRenewalStub - fakeReturns := fake.getDurationToNextRenewalReturns fake.recordInvocation("GetDurationToNextRenewal", []interface{}{arg1, arg2, arg3}) fake.getDurationToNextRenewalMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GetDurationToNextRenewalStub != nil { + return fake.GetDurationToNextRenewalStub(arg1, arg2, arg3) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getDurationToNextRenewalReturns return fakeReturns.result1, fakeReturns.result2 } @@ -221,16 +219,15 @@ func (fake *CertificateManager) GetSignCert(arg1 string, arg2 string) ([]byte, e arg1 string arg2 string }{arg1, arg2}) - stub := fake.GetSignCertStub - fakeReturns := fake.getSignCertReturns fake.recordInvocation("GetSignCert", []interface{}{arg1, arg2}) fake.getSignCertMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.GetSignCertStub != nil { + return fake.GetSignCertStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getSignCertReturns return fakeReturns.result1, fakeReturns.result2 } @@ -291,16 +288,15 @@ func (fake *CertificateManager) RenewCert(arg1 common.SecretType, arg2 certifica arg6 bool arg7 bool }{arg1, arg2, arg3, arg4, arg5, arg6, arg7}) - stub := fake.RenewCertStub - fakeReturns := fake.renewCertReturns fake.recordInvocation("RenewCert", []interface{}{arg1, arg2, arg3, arg4, arg5, arg6, arg7}) fake.renewCertMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3, arg4, arg5, arg6, arg7) + if fake.RenewCertStub != nil { + return fake.RenewCertStub(arg1, arg2, arg3, arg4, arg5, arg6, arg7) } if specificReturn { return ret.result1 } + fakeReturns := fake.renewCertReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/peer/mocks/deployment_manager.go b/pkg/offering/base/peer/mocks/deployment_manager.go index 67269fa8..29da35a3 100644 --- a/pkg/offering/base/peer/mocks/deployment_manager.go +++ b/pkg/offering/base/peer/mocks/deployment_manager.go @@ -145,16 +145,15 @@ func (fake *DeploymentManager) CheckForSecretChange(arg1 v1.Object, arg2 string, arg2 string arg3 func(string, *v1a.Deployment) bool }{arg1, arg2, arg3}) - stub := fake.CheckForSecretChangeStub - fakeReturns := fake.checkForSecretChangeReturns fake.recordInvocation("CheckForSecretChange", []interface{}{arg1, arg2, arg3}) fake.checkForSecretChangeMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.CheckForSecretChangeStub != nil { + return fake.CheckForSecretChangeStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.checkForSecretChangeReturns return fakeReturns.result1 } @@ -206,16 +205,15 @@ func (fake *DeploymentManager) CheckState(arg1 v1.Object) error { fake.checkStateArgsForCall = append(fake.checkStateArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.CheckStateStub - fakeReturns := fake.checkStateReturns fake.recordInvocation("CheckState", []interface{}{arg1}) fake.checkStateMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.CheckStateStub != nil { + return fake.CheckStateStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.checkStateReturns return fakeReturns.result1 } @@ -267,16 +265,15 @@ func (fake *DeploymentManager) Delete(arg1 v1.Object) error { fake.deleteArgsForCall = append(fake.deleteArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.DeleteStub - fakeReturns := fake.deleteReturns fake.recordInvocation("Delete", []interface{}{arg1}) fake.deleteMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.DeleteStub != nil { + return fake.DeleteStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.deleteReturns return fakeReturns.result1 } @@ -328,16 +325,15 @@ func (fake *DeploymentManager) DeploymentStatus(arg1 v1.Object) (v1a.DeploymentS fake.deploymentStatusArgsForCall = append(fake.deploymentStatusArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.DeploymentStatusStub - fakeReturns := fake.deploymentStatusReturns fake.recordInvocation("DeploymentStatus", []interface{}{arg1}) fake.deploymentStatusMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.DeploymentStatusStub != nil { + return fake.DeploymentStatusStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.deploymentStatusReturns return fakeReturns.result1, fakeReturns.result2 } @@ -392,16 +388,15 @@ func (fake *DeploymentManager) Exists(arg1 v1.Object) bool { fake.existsArgsForCall = append(fake.existsArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ExistsStub - fakeReturns := fake.existsReturns fake.recordInvocation("Exists", []interface{}{arg1}) fake.existsMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ExistsStub != nil { + return fake.ExistsStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.existsReturns return fakeReturns.result1 } @@ -453,16 +448,15 @@ func (fake *DeploymentManager) Get(arg1 v1.Object) (client.Object, error) { fake.getArgsForCall = append(fake.getArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.GetStub - fakeReturns := fake.getReturns fake.recordInvocation("Get", []interface{}{arg1}) fake.getMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetStub != nil { + return fake.GetStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getReturns return fakeReturns.result1, fakeReturns.result2 } @@ -517,16 +511,15 @@ func (fake *DeploymentManager) GetName(arg1 v1.Object) string { fake.getNameArgsForCall = append(fake.getNameArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.GetNameStub - fakeReturns := fake.getNameReturns fake.recordInvocation("GetName", []interface{}{arg1}) fake.getNameMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetNameStub != nil { + return fake.GetNameStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.getNameReturns return fakeReturns.result1 } @@ -577,16 +570,15 @@ func (fake *DeploymentManager) GetScheme() *runtime.Scheme { ret, specificReturn := fake.getSchemeReturnsOnCall[len(fake.getSchemeArgsForCall)] fake.getSchemeArgsForCall = append(fake.getSchemeArgsForCall, struct { }{}) - stub := fake.GetSchemeStub - fakeReturns := fake.getSchemeReturns fake.recordInvocation("GetScheme", []interface{}{}) fake.getSchemeMutex.Unlock() - if stub != nil { - return stub() + if fake.GetSchemeStub != nil { + return fake.GetSchemeStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getSchemeReturns return fakeReturns.result1 } @@ -632,16 +624,15 @@ func (fake *DeploymentManager) Reconcile(arg1 v1.Object, arg2 bool) error { arg1 v1.Object arg2 bool }{arg1, arg2}) - stub := fake.ReconcileStub - fakeReturns := fake.reconcileReturns fake.recordInvocation("Reconcile", []interface{}{arg1, arg2}) fake.reconcileMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ReconcileStub != nil { + return fake.ReconcileStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.reconcileReturns return fakeReturns.result1 } @@ -693,16 +684,15 @@ func (fake *DeploymentManager) RestoreState(arg1 v1.Object) error { fake.restoreStateArgsForCall = append(fake.restoreStateArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.RestoreStateStub - fakeReturns := fake.restoreStateReturns fake.recordInvocation("RestoreState", []interface{}{arg1}) fake.restoreStateMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.RestoreStateStub != nil { + return fake.RestoreStateStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.restoreStateReturns return fakeReturns.result1 } @@ -753,10 +743,9 @@ func (fake *DeploymentManager) SetCustomName(arg1 string) { fake.setCustomNameArgsForCall = append(fake.setCustomNameArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetCustomNameStub fake.recordInvocation("SetCustomName", []interface{}{arg1}) fake.setCustomNameMutex.Unlock() - if stub != nil { + if fake.SetCustomNameStub != nil { fake.SetCustomNameStub(arg1) } } diff --git a/pkg/offering/base/peer/mocks/initializer.go b/pkg/offering/base/peer/mocks/initializer.go index 01fdda8c..75b29872 100644 --- a/pkg/offering/base/peer/mocks/initializer.go +++ b/pkg/offering/base/peer/mocks/initializer.go @@ -186,16 +186,15 @@ func (fake *InitializeIBPPeer) CheckIfAdminCertsUpdated(arg1 *v1beta1.IBPPeer) ( fake.checkIfAdminCertsUpdatedArgsForCall = append(fake.checkIfAdminCertsUpdatedArgsForCall, struct { arg1 *v1beta1.IBPPeer }{arg1}) - stub := fake.CheckIfAdminCertsUpdatedStub - fakeReturns := fake.checkIfAdminCertsUpdatedReturns fake.recordInvocation("CheckIfAdminCertsUpdated", []interface{}{arg1}) fake.checkIfAdminCertsUpdatedMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.CheckIfAdminCertsUpdatedStub != nil { + return fake.CheckIfAdminCertsUpdatedStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.checkIfAdminCertsUpdatedReturns return fakeReturns.result1, fakeReturns.result2 } @@ -249,16 +248,15 @@ func (fake *InitializeIBPPeer) CoreConfigMap() *initializer.CoreConfigMap { ret, specificReturn := fake.coreConfigMapReturnsOnCall[len(fake.coreConfigMapArgsForCall)] fake.coreConfigMapArgsForCall = append(fake.coreConfigMapArgsForCall, struct { }{}) - stub := fake.CoreConfigMapStub - fakeReturns := fake.coreConfigMapReturns fake.recordInvocation("CoreConfigMap", []interface{}{}) fake.coreConfigMapMutex.Unlock() - if stub != nil { - return stub() + if fake.CoreConfigMapStub != nil { + return fake.CoreConfigMapStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.coreConfigMapReturns return fakeReturns.result1 } @@ -305,16 +303,15 @@ func (fake *InitializeIBPPeer) Create(arg1 initializer.CoreConfig, arg2 initiali arg2 initializer.IBPPeer arg3 string }{arg1, arg2, arg3}) - stub := fake.CreateStub - fakeReturns := fake.createReturns fake.recordInvocation("Create", []interface{}{arg1, arg2, arg3}) fake.createMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.CreateStub != nil { + return fake.CreateStub(arg1, arg2, arg3) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.createReturns return fakeReturns.result1, fakeReturns.result2 } @@ -370,16 +367,15 @@ func (fake *InitializeIBPPeer) GenerateOrdererCACertsSecret(arg1 *v1beta1.IBPPee arg1 *v1beta1.IBPPeer arg2 map[string][]byte }{arg1, arg2}) - stub := fake.GenerateOrdererCACertsSecretStub - fakeReturns := fake.generateOrdererCACertsSecretReturns fake.recordInvocation("GenerateOrdererCACertsSecret", []interface{}{arg1, arg2}) fake.generateOrdererCACertsSecretMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.GenerateOrdererCACertsSecretStub != nil { + return fake.GenerateOrdererCACertsSecretStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.generateOrdererCACertsSecretReturns return fakeReturns.result1 } @@ -433,16 +429,15 @@ func (fake *InitializeIBPPeer) GenerateSecrets(arg1 common.SecretType, arg2 v1.O arg2 v1.Object arg3 *config.Response }{arg1, arg2, arg3}) - stub := fake.GenerateSecretsStub - fakeReturns := fake.generateSecretsReturns fake.recordInvocation("GenerateSecrets", []interface{}{arg1, arg2, arg3}) fake.generateSecretsMutex.Unlock() - if stub != nil { - return stub(arg1, arg2, arg3) + if fake.GenerateSecretsStub != nil { + return fake.GenerateSecretsStub(arg1, arg2, arg3) } if specificReturn { return ret.result1 } + fakeReturns := fake.generateSecretsReturns return fakeReturns.result1 } @@ -495,16 +490,15 @@ func (fake *InitializeIBPPeer) GenerateSecretsFromResponse(arg1 *v1beta1.IBPPeer arg1 *v1beta1.IBPPeer arg2 *config.CryptoResponse }{arg1, arg2}) - stub := fake.GenerateSecretsFromResponseStub - fakeReturns := fake.generateSecretsFromResponseReturns fake.recordInvocation("GenerateSecretsFromResponse", []interface{}{arg1, arg2}) fake.generateSecretsFromResponseMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.GenerateSecretsFromResponseStub != nil { + return fake.GenerateSecretsFromResponseStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.generateSecretsFromResponseReturns return fakeReturns.result1 } @@ -556,16 +550,15 @@ func (fake *InitializeIBPPeer) GetCrypto(arg1 *v1beta1.IBPPeer) (*config.CryptoR fake.getCryptoArgsForCall = append(fake.getCryptoArgsForCall, struct { arg1 *v1beta1.IBPPeer }{arg1}) - stub := fake.GetCryptoStub - fakeReturns := fake.getCryptoReturns fake.recordInvocation("GetCrypto", []interface{}{arg1}) fake.getCryptoMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetCryptoStub != nil { + return fake.GetCryptoStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getCryptoReturns return fakeReturns.result1, fakeReturns.result2 } @@ -621,16 +614,15 @@ func (fake *InitializeIBPPeer) GetInitPeer(arg1 *v1beta1.IBPPeer, arg2 string) ( arg1 *v1beta1.IBPPeer arg2 string }{arg1, arg2}) - stub := fake.GetInitPeerStub - fakeReturns := fake.getInitPeerReturns fake.recordInvocation("GetInitPeer", []interface{}{arg1, arg2}) fake.getInitPeerMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.GetInitPeerStub != nil { + return fake.GetInitPeerStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getInitPeerReturns return fakeReturns.result1, fakeReturns.result2 } @@ -685,16 +677,15 @@ func (fake *InitializeIBPPeer) GetUpdatedPeer(arg1 *v1beta1.IBPPeer) (*initializ fake.getUpdatedPeerArgsForCall = append(fake.getUpdatedPeerArgsForCall, struct { arg1 *v1beta1.IBPPeer }{arg1}) - stub := fake.GetUpdatedPeerStub - fakeReturns := fake.getUpdatedPeerReturns fake.recordInvocation("GetUpdatedPeer", []interface{}{arg1}) fake.getUpdatedPeerMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.GetUpdatedPeerStub != nil { + return fake.GetUpdatedPeerStub(arg1) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.getUpdatedPeerReturns return fakeReturns.result1, fakeReturns.result2 } @@ -749,16 +740,15 @@ func (fake *InitializeIBPPeer) MissingCrypto(arg1 *v1beta1.IBPPeer) bool { fake.missingCryptoArgsForCall = append(fake.missingCryptoArgsForCall, struct { arg1 *v1beta1.IBPPeer }{arg1}) - stub := fake.MissingCryptoStub - fakeReturns := fake.missingCryptoReturns fake.recordInvocation("MissingCrypto", []interface{}{arg1}) fake.missingCryptoMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.MissingCryptoStub != nil { + return fake.MissingCryptoStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.missingCryptoReturns return fakeReturns.result1 } @@ -811,16 +801,15 @@ func (fake *InitializeIBPPeer) Update(arg1 initializer.CoreConfig, arg2 initiali arg1 initializer.CoreConfig arg2 initializer.IBPPeer }{arg1, arg2}) - stub := fake.UpdateStub - fakeReturns := fake.updateReturns fake.recordInvocation("Update", []interface{}{arg1, arg2}) fake.updateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.UpdateStub != nil { + return fake.UpdateStub(arg1, arg2) } if specificReturn { return ret.result1, ret.result2 } + fakeReturns := fake.updateReturns return fakeReturns.result1, fakeReturns.result2 } @@ -875,16 +864,15 @@ func (fake *InitializeIBPPeer) UpdateAdminSecret(arg1 *v1beta1.IBPPeer) error { fake.updateAdminSecretArgsForCall = append(fake.updateAdminSecretArgsForCall, struct { arg1 *v1beta1.IBPPeer }{arg1}) - stub := fake.UpdateAdminSecretStub - fakeReturns := fake.updateAdminSecretReturns fake.recordInvocation("UpdateAdminSecret", []interface{}{arg1}) fake.updateAdminSecretMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.UpdateAdminSecretStub != nil { + return fake.UpdateAdminSecretStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateAdminSecretReturns return fakeReturns.result1 } @@ -937,16 +925,15 @@ func (fake *InitializeIBPPeer) UpdateSecretsFromResponse(arg1 *v1beta1.IBPPeer, arg1 *v1beta1.IBPPeer arg2 *config.CryptoResponse }{arg1, arg2}) - stub := fake.UpdateSecretsFromResponseStub - fakeReturns := fake.updateSecretsFromResponseReturns fake.recordInvocation("UpdateSecretsFromResponse", []interface{}{arg1, arg2}) fake.updateSecretsFromResponseMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.UpdateSecretsFromResponseStub != nil { + return fake.UpdateSecretsFromResponseStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateSecretsFromResponseReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/peer/mocks/restart_manager.go b/pkg/offering/base/peer/mocks/restart_manager.go index 08e20f32..de780b9b 100644 --- a/pkg/offering/base/peer/mocks/restart_manager.go +++ b/pkg/offering/base/peer/mocks/restart_manager.go @@ -88,16 +88,15 @@ func (fake *RestartManager) ForAdminCertUpdate(arg1 v1.Object) error { fake.forAdminCertUpdateArgsForCall = append(fake.forAdminCertUpdateArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForAdminCertUpdateStub - fakeReturns := fake.forAdminCertUpdateReturns fake.recordInvocation("ForAdminCertUpdate", []interface{}{arg1}) fake.forAdminCertUpdateMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForAdminCertUpdateStub != nil { + return fake.ForAdminCertUpdateStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forAdminCertUpdateReturns return fakeReturns.result1 } @@ -150,16 +149,15 @@ func (fake *RestartManager) ForCertUpdate(arg1 common.SecretType, arg2 v1.Object arg1 common.SecretType arg2 v1.Object }{arg1, arg2}) - stub := fake.ForCertUpdateStub - fakeReturns := fake.forCertUpdateReturns fake.recordInvocation("ForCertUpdate", []interface{}{arg1, arg2}) fake.forCertUpdateMutex.Unlock() - if stub != nil { - return stub(arg1, arg2) + if fake.ForCertUpdateStub != nil { + return fake.ForCertUpdateStub(arg1, arg2) } if specificReturn { return ret.result1 } + fakeReturns := fake.forCertUpdateReturns return fakeReturns.result1 } @@ -211,16 +209,15 @@ func (fake *RestartManager) ForConfigOverride(arg1 v1.Object) error { fake.forConfigOverrideArgsForCall = append(fake.forConfigOverrideArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForConfigOverrideStub - fakeReturns := fake.forConfigOverrideReturns fake.recordInvocation("ForConfigOverride", []interface{}{arg1}) fake.forConfigOverrideMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForConfigOverrideStub != nil { + return fake.ForConfigOverrideStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forConfigOverrideReturns return fakeReturns.result1 } @@ -272,16 +269,15 @@ func (fake *RestartManager) ForNodeOU(arg1 v1.Object) error { fake.forNodeOUArgsForCall = append(fake.forNodeOUArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForNodeOUStub - fakeReturns := fake.forNodeOUReturns fake.recordInvocation("ForNodeOU", []interface{}{arg1}) fake.forNodeOUMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForNodeOUStub != nil { + return fake.ForNodeOUStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forNodeOUReturns return fakeReturns.result1 } @@ -333,16 +329,15 @@ func (fake *RestartManager) ForRestartAction(arg1 v1.Object) error { fake.forRestartActionArgsForCall = append(fake.forRestartActionArgsForCall, struct { arg1 v1.Object }{arg1}) - stub := fake.ForRestartActionStub - fakeReturns := fake.forRestartActionReturns fake.recordInvocation("ForRestartAction", []interface{}{arg1}) fake.forRestartActionMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ForRestartActionStub != nil { + return fake.ForRestartActionStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.forRestartActionReturns return fakeReturns.result1 } @@ -394,16 +389,15 @@ func (fake *RestartManager) TriggerIfNeeded(arg1 restart.Instance) error { fake.triggerIfNeededArgsForCall = append(fake.triggerIfNeededArgsForCall, struct { arg1 restart.Instance }{arg1}) - stub := fake.TriggerIfNeededStub - fakeReturns := fake.triggerIfNeededReturns fake.recordInvocation("TriggerIfNeeded", []interface{}{arg1}) fake.triggerIfNeededMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.TriggerIfNeededStub != nil { + return fake.TriggerIfNeededStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.triggerIfNeededReturns return fakeReturns.result1 } diff --git a/pkg/offering/base/peer/mocks/update.go b/pkg/offering/base/peer/mocks/update.go index e5f35c32..37d08520 100644 --- a/pkg/offering/base/peer/mocks/update.go +++ b/pkg/offering/base/peer/mocks/update.go @@ -49,16 +49,6 @@ type Update struct { cryptoBackupNeededReturnsOnCall map[int]struct { result1 bool } - DindArgsUpdatedStub func() bool - dindArgsUpdatedMutex sync.RWMutex - dindArgsUpdatedArgsForCall []struct { - } - dindArgsUpdatedReturns struct { - result1 bool - } - dindArgsUpdatedReturnsOnCall map[int]struct { - result1 bool - } EcertEnrollStub func() bool ecertEnrollMutex sync.RWMutex ecertEnrollArgsForCall []struct { @@ -199,11 +189,6 @@ type Update struct { restartNeededReturnsOnCall map[int]struct { result1 bool } - SetDindArgsUpdatedStub func(bool) - setDindArgsUpdatedMutex sync.RWMutex - setDindArgsUpdatedArgsForCall []struct { - arg1 bool - } SpecUpdatedStub func() bool specUpdatedMutex sync.RWMutex specUpdatedArgsForCall []struct { @@ -273,16 +258,15 @@ func (fake *Update) CertificateCreated() bool { ret, specificReturn := fake.certificateCreatedReturnsOnCall[len(fake.certificateCreatedArgsForCall)] fake.certificateCreatedArgsForCall = append(fake.certificateCreatedArgsForCall, struct { }{}) - stub := fake.CertificateCreatedStub - fakeReturns := fake.certificateCreatedReturns fake.recordInvocation("CertificateCreated", []interface{}{}) fake.certificateCreatedMutex.Unlock() - if stub != nil { - return stub() + if fake.CertificateCreatedStub != nil { + return fake.CertificateCreatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.certificateCreatedReturns return fakeReturns.result1 } @@ -326,16 +310,15 @@ func (fake *Update) CertificateUpdated() bool { ret, specificReturn := fake.certificateUpdatedReturnsOnCall[len(fake.certificateUpdatedArgsForCall)] fake.certificateUpdatedArgsForCall = append(fake.certificateUpdatedArgsForCall, struct { }{}) - stub := fake.CertificateUpdatedStub - fakeReturns := fake.certificateUpdatedReturns fake.recordInvocation("CertificateUpdated", []interface{}{}) fake.certificateUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.CertificateUpdatedStub != nil { + return fake.CertificateUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.certificateUpdatedReturns return fakeReturns.result1 } @@ -379,16 +362,15 @@ func (fake *Update) ConfigOverridesUpdated() bool { ret, specificReturn := fake.configOverridesUpdatedReturnsOnCall[len(fake.configOverridesUpdatedArgsForCall)] fake.configOverridesUpdatedArgsForCall = append(fake.configOverridesUpdatedArgsForCall, struct { }{}) - stub := fake.ConfigOverridesUpdatedStub - fakeReturns := fake.configOverridesUpdatedReturns fake.recordInvocation("ConfigOverridesUpdated", []interface{}{}) fake.configOverridesUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.ConfigOverridesUpdatedStub != nil { + return fake.ConfigOverridesUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.configOverridesUpdatedReturns return fakeReturns.result1 } @@ -432,16 +414,15 @@ func (fake *Update) CryptoBackupNeeded() bool { ret, specificReturn := fake.cryptoBackupNeededReturnsOnCall[len(fake.cryptoBackupNeededArgsForCall)] fake.cryptoBackupNeededArgsForCall = append(fake.cryptoBackupNeededArgsForCall, struct { }{}) - stub := fake.CryptoBackupNeededStub - fakeReturns := fake.cryptoBackupNeededReturns fake.recordInvocation("CryptoBackupNeeded", []interface{}{}) fake.cryptoBackupNeededMutex.Unlock() - if stub != nil { - return stub() + if fake.CryptoBackupNeededStub != nil { + return fake.CryptoBackupNeededStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.cryptoBackupNeededReturns return fakeReturns.result1 } @@ -480,74 +461,20 @@ func (fake *Update) CryptoBackupNeededReturnsOnCall(i int, result1 bool) { }{result1} } -func (fake *Update) DindArgsUpdated() bool { - fake.dindArgsUpdatedMutex.Lock() - ret, specificReturn := fake.dindArgsUpdatedReturnsOnCall[len(fake.dindArgsUpdatedArgsForCall)] - fake.dindArgsUpdatedArgsForCall = append(fake.dindArgsUpdatedArgsForCall, struct { - }{}) - stub := fake.DindArgsUpdatedStub - fakeReturns := fake.dindArgsUpdatedReturns - fake.recordInvocation("DindArgsUpdated", []interface{}{}) - fake.dindArgsUpdatedMutex.Unlock() - if stub != nil { - return stub() - } - if specificReturn { - return ret.result1 - } - return fakeReturns.result1 -} - -func (fake *Update) DindArgsUpdatedCallCount() int { - fake.dindArgsUpdatedMutex.RLock() - defer fake.dindArgsUpdatedMutex.RUnlock() - return len(fake.dindArgsUpdatedArgsForCall) -} - -func (fake *Update) DindArgsUpdatedCalls(stub func() bool) { - fake.dindArgsUpdatedMutex.Lock() - defer fake.dindArgsUpdatedMutex.Unlock() - fake.DindArgsUpdatedStub = stub -} - -func (fake *Update) DindArgsUpdatedReturns(result1 bool) { - fake.dindArgsUpdatedMutex.Lock() - defer fake.dindArgsUpdatedMutex.Unlock() - fake.DindArgsUpdatedStub = nil - fake.dindArgsUpdatedReturns = struct { - result1 bool - }{result1} -} - -func (fake *Update) DindArgsUpdatedReturnsOnCall(i int, result1 bool) { - fake.dindArgsUpdatedMutex.Lock() - defer fake.dindArgsUpdatedMutex.Unlock() - fake.DindArgsUpdatedStub = nil - if fake.dindArgsUpdatedReturnsOnCall == nil { - fake.dindArgsUpdatedReturnsOnCall = make(map[int]struct { - result1 bool - }) - } - fake.dindArgsUpdatedReturnsOnCall[i] = struct { - result1 bool - }{result1} -} - func (fake *Update) EcertEnroll() bool { fake.ecertEnrollMutex.Lock() ret, specificReturn := fake.ecertEnrollReturnsOnCall[len(fake.ecertEnrollArgsForCall)] fake.ecertEnrollArgsForCall = append(fake.ecertEnrollArgsForCall, struct { }{}) - stub := fake.EcertEnrollStub - fakeReturns := fake.ecertEnrollReturns fake.recordInvocation("EcertEnroll", []interface{}{}) fake.ecertEnrollMutex.Unlock() - if stub != nil { - return stub() + if fake.EcertEnrollStub != nil { + return fake.EcertEnrollStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.ecertEnrollReturns return fakeReturns.result1 } @@ -591,16 +518,15 @@ func (fake *Update) EcertNewKeyReenroll() bool { ret, specificReturn := fake.ecertNewKeyReenrollReturnsOnCall[len(fake.ecertNewKeyReenrollArgsForCall)] fake.ecertNewKeyReenrollArgsForCall = append(fake.ecertNewKeyReenrollArgsForCall, struct { }{}) - stub := fake.EcertNewKeyReenrollStub - fakeReturns := fake.ecertNewKeyReenrollReturns fake.recordInvocation("EcertNewKeyReenroll", []interface{}{}) fake.ecertNewKeyReenrollMutex.Unlock() - if stub != nil { - return stub() + if fake.EcertNewKeyReenrollStub != nil { + return fake.EcertNewKeyReenrollStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.ecertNewKeyReenrollReturns return fakeReturns.result1 } @@ -644,16 +570,15 @@ func (fake *Update) EcertReenrollNeeded() bool { ret, specificReturn := fake.ecertReenrollNeededReturnsOnCall[len(fake.ecertReenrollNeededArgsForCall)] fake.ecertReenrollNeededArgsForCall = append(fake.ecertReenrollNeededArgsForCall, struct { }{}) - stub := fake.EcertReenrollNeededStub - fakeReturns := fake.ecertReenrollNeededReturns fake.recordInvocation("EcertReenrollNeeded", []interface{}{}) fake.ecertReenrollNeededMutex.Unlock() - if stub != nil { - return stub() + if fake.EcertReenrollNeededStub != nil { + return fake.EcertReenrollNeededStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.ecertReenrollNeededReturns return fakeReturns.result1 } @@ -697,16 +622,15 @@ func (fake *Update) EcertUpdated() bool { ret, specificReturn := fake.ecertUpdatedReturnsOnCall[len(fake.ecertUpdatedArgsForCall)] fake.ecertUpdatedArgsForCall = append(fake.ecertUpdatedArgsForCall, struct { }{}) - stub := fake.EcertUpdatedStub - fakeReturns := fake.ecertUpdatedReturns fake.recordInvocation("EcertUpdated", []interface{}{}) fake.ecertUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.EcertUpdatedStub != nil { + return fake.EcertUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.ecertUpdatedReturns return fakeReturns.result1 } @@ -750,16 +674,15 @@ func (fake *Update) FabricVersionUpdated() bool { ret, specificReturn := fake.fabricVersionUpdatedReturnsOnCall[len(fake.fabricVersionUpdatedArgsForCall)] fake.fabricVersionUpdatedArgsForCall = append(fake.fabricVersionUpdatedArgsForCall, struct { }{}) - stub := fake.FabricVersionUpdatedStub - fakeReturns := fake.fabricVersionUpdatedReturns fake.recordInvocation("FabricVersionUpdated", []interface{}{}) fake.fabricVersionUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.FabricVersionUpdatedStub != nil { + return fake.FabricVersionUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.fabricVersionUpdatedReturns return fakeReturns.result1 } @@ -803,16 +726,15 @@ func (fake *Update) GetCreatedCertType() common.SecretType { ret, specificReturn := fake.getCreatedCertTypeReturnsOnCall[len(fake.getCreatedCertTypeArgsForCall)] fake.getCreatedCertTypeArgsForCall = append(fake.getCreatedCertTypeArgsForCall, struct { }{}) - stub := fake.GetCreatedCertTypeStub - fakeReturns := fake.getCreatedCertTypeReturns fake.recordInvocation("GetCreatedCertType", []interface{}{}) fake.getCreatedCertTypeMutex.Unlock() - if stub != nil { - return stub() + if fake.GetCreatedCertTypeStub != nil { + return fake.GetCreatedCertTypeStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getCreatedCertTypeReturns return fakeReturns.result1 } @@ -856,16 +778,15 @@ func (fake *Update) ImagesUpdated() bool { ret, specificReturn := fake.imagesUpdatedReturnsOnCall[len(fake.imagesUpdatedArgsForCall)] fake.imagesUpdatedArgsForCall = append(fake.imagesUpdatedArgsForCall, struct { }{}) - stub := fake.ImagesUpdatedStub - fakeReturns := fake.imagesUpdatedReturns fake.recordInvocation("ImagesUpdated", []interface{}{}) fake.imagesUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.ImagesUpdatedStub != nil { + return fake.ImagesUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.imagesUpdatedReturns return fakeReturns.result1 } @@ -909,16 +830,15 @@ func (fake *Update) MSPUpdated() bool { ret, specificReturn := fake.mSPUpdatedReturnsOnCall[len(fake.mSPUpdatedArgsForCall)] fake.mSPUpdatedArgsForCall = append(fake.mSPUpdatedArgsForCall, struct { }{}) - stub := fake.MSPUpdatedStub - fakeReturns := fake.mSPUpdatedReturns fake.recordInvocation("MSPUpdated", []interface{}{}) fake.mSPUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.MSPUpdatedStub != nil { + return fake.MSPUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.mSPUpdatedReturns return fakeReturns.result1 } @@ -962,16 +882,15 @@ func (fake *Update) MigrateToV2() bool { ret, specificReturn := fake.migrateToV2ReturnsOnCall[len(fake.migrateToV2ArgsForCall)] fake.migrateToV2ArgsForCall = append(fake.migrateToV2ArgsForCall, struct { }{}) - stub := fake.MigrateToV2Stub - fakeReturns := fake.migrateToV2Returns fake.recordInvocation("MigrateToV2", []interface{}{}) fake.migrateToV2Mutex.Unlock() - if stub != nil { - return stub() + if fake.MigrateToV2Stub != nil { + return fake.MigrateToV2Stub() } if specificReturn { return ret.result1 } + fakeReturns := fake.migrateToV2Returns return fakeReturns.result1 } @@ -1015,16 +934,15 @@ func (fake *Update) MigrateToV24() bool { ret, specificReturn := fake.migrateToV24ReturnsOnCall[len(fake.migrateToV24ArgsForCall)] fake.migrateToV24ArgsForCall = append(fake.migrateToV24ArgsForCall, struct { }{}) - stub := fake.MigrateToV24Stub - fakeReturns := fake.migrateToV24Returns fake.recordInvocation("MigrateToV24", []interface{}{}) fake.migrateToV24Mutex.Unlock() - if stub != nil { - return stub() + if fake.MigrateToV24Stub != nil { + return fake.MigrateToV24Stub() } if specificReturn { return ret.result1 } + fakeReturns := fake.migrateToV24Returns return fakeReturns.result1 } @@ -1068,16 +986,15 @@ func (fake *Update) MigrateToV25() bool { ret, specificReturn := fake.migrateToV25ReturnsOnCall[len(fake.migrateToV25ArgsForCall)] fake.migrateToV25ArgsForCall = append(fake.migrateToV25ArgsForCall, struct { }{}) - stub := fake.MigrateToV25Stub - fakeReturns := fake.migrateToV25Returns fake.recordInvocation("MigrateToV25", []interface{}{}) fake.migrateToV25Mutex.Unlock() - if stub != nil { - return stub() + if fake.MigrateToV25Stub != nil { + return fake.MigrateToV25Stub() } if specificReturn { return ret.result1 } + fakeReturns := fake.migrateToV25Returns return fakeReturns.result1 } @@ -1121,16 +1038,15 @@ func (fake *Update) NodeOUUpdated() bool { ret, specificReturn := fake.nodeOUUpdatedReturnsOnCall[len(fake.nodeOUUpdatedArgsForCall)] fake.nodeOUUpdatedArgsForCall = append(fake.nodeOUUpdatedArgsForCall, struct { }{}) - stub := fake.NodeOUUpdatedStub - fakeReturns := fake.nodeOUUpdatedReturns fake.recordInvocation("NodeOUUpdated", []interface{}{}) fake.nodeOUUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.NodeOUUpdatedStub != nil { + return fake.NodeOUUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.nodeOUUpdatedReturns return fakeReturns.result1 } @@ -1174,16 +1090,15 @@ func (fake *Update) PeerTagUpdated() bool { ret, specificReturn := fake.peerTagUpdatedReturnsOnCall[len(fake.peerTagUpdatedArgsForCall)] fake.peerTagUpdatedArgsForCall = append(fake.peerTagUpdatedArgsForCall, struct { }{}) - stub := fake.PeerTagUpdatedStub - fakeReturns := fake.peerTagUpdatedReturns fake.recordInvocation("PeerTagUpdated", []interface{}{}) fake.peerTagUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.PeerTagUpdatedStub != nil { + return fake.PeerTagUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.peerTagUpdatedReturns return fakeReturns.result1 } @@ -1227,16 +1142,15 @@ func (fake *Update) RestartNeeded() bool { ret, specificReturn := fake.restartNeededReturnsOnCall[len(fake.restartNeededArgsForCall)] fake.restartNeededArgsForCall = append(fake.restartNeededArgsForCall, struct { }{}) - stub := fake.RestartNeededStub - fakeReturns := fake.restartNeededReturns fake.recordInvocation("RestartNeeded", []interface{}{}) fake.restartNeededMutex.Unlock() - if stub != nil { - return stub() + if fake.RestartNeededStub != nil { + return fake.RestartNeededStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.restartNeededReturns return fakeReturns.result1 } @@ -1275,53 +1189,20 @@ func (fake *Update) RestartNeededReturnsOnCall(i int, result1 bool) { }{result1} } -func (fake *Update) SetDindArgsUpdated(arg1 bool) { - fake.setDindArgsUpdatedMutex.Lock() - fake.setDindArgsUpdatedArgsForCall = append(fake.setDindArgsUpdatedArgsForCall, struct { - arg1 bool - }{arg1}) - stub := fake.SetDindArgsUpdatedStub - fake.recordInvocation("SetDindArgsUpdated", []interface{}{arg1}) - fake.setDindArgsUpdatedMutex.Unlock() - if stub != nil { - fake.SetDindArgsUpdatedStub(arg1) - } -} - -func (fake *Update) SetDindArgsUpdatedCallCount() int { - fake.setDindArgsUpdatedMutex.RLock() - defer fake.setDindArgsUpdatedMutex.RUnlock() - return len(fake.setDindArgsUpdatedArgsForCall) -} - -func (fake *Update) SetDindArgsUpdatedCalls(stub func(bool)) { - fake.setDindArgsUpdatedMutex.Lock() - defer fake.setDindArgsUpdatedMutex.Unlock() - fake.SetDindArgsUpdatedStub = stub -} - -func (fake *Update) SetDindArgsUpdatedArgsForCall(i int) bool { - fake.setDindArgsUpdatedMutex.RLock() - defer fake.setDindArgsUpdatedMutex.RUnlock() - argsForCall := fake.setDindArgsUpdatedArgsForCall[i] - return argsForCall.arg1 -} - func (fake *Update) SpecUpdated() bool { fake.specUpdatedMutex.Lock() ret, specificReturn := fake.specUpdatedReturnsOnCall[len(fake.specUpdatedArgsForCall)] fake.specUpdatedArgsForCall = append(fake.specUpdatedArgsForCall, struct { }{}) - stub := fake.SpecUpdatedStub - fakeReturns := fake.specUpdatedReturns fake.recordInvocation("SpecUpdated", []interface{}{}) fake.specUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.SpecUpdatedStub != nil { + return fake.SpecUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.specUpdatedReturns return fakeReturns.result1 } @@ -1365,16 +1246,15 @@ func (fake *Update) TLSCertEnroll() bool { ret, specificReturn := fake.tLSCertEnrollReturnsOnCall[len(fake.tLSCertEnrollArgsForCall)] fake.tLSCertEnrollArgsForCall = append(fake.tLSCertEnrollArgsForCall, struct { }{}) - stub := fake.TLSCertEnrollStub - fakeReturns := fake.tLSCertEnrollReturns fake.recordInvocation("TLSCertEnroll", []interface{}{}) fake.tLSCertEnrollMutex.Unlock() - if stub != nil { - return stub() + if fake.TLSCertEnrollStub != nil { + return fake.TLSCertEnrollStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.tLSCertEnrollReturns return fakeReturns.result1 } @@ -1418,16 +1298,15 @@ func (fake *Update) TLSCertUpdated() bool { ret, specificReturn := fake.tLSCertUpdatedReturnsOnCall[len(fake.tLSCertUpdatedArgsForCall)] fake.tLSCertUpdatedArgsForCall = append(fake.tLSCertUpdatedArgsForCall, struct { }{}) - stub := fake.TLSCertUpdatedStub - fakeReturns := fake.tLSCertUpdatedReturns fake.recordInvocation("TLSCertUpdated", []interface{}{}) fake.tLSCertUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.TLSCertUpdatedStub != nil { + return fake.TLSCertUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.tLSCertUpdatedReturns return fakeReturns.result1 } @@ -1471,16 +1350,15 @@ func (fake *Update) TLSReenrollNeeded() bool { ret, specificReturn := fake.tLSReenrollNeededReturnsOnCall[len(fake.tLSReenrollNeededArgsForCall)] fake.tLSReenrollNeededArgsForCall = append(fake.tLSReenrollNeededArgsForCall, struct { }{}) - stub := fake.TLSReenrollNeededStub - fakeReturns := fake.tLSReenrollNeededReturns fake.recordInvocation("TLSReenrollNeeded", []interface{}{}) fake.tLSReenrollNeededMutex.Unlock() - if stub != nil { - return stub() + if fake.TLSReenrollNeededStub != nil { + return fake.TLSReenrollNeededStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.tLSReenrollNeededReturns return fakeReturns.result1 } @@ -1524,16 +1402,15 @@ func (fake *Update) TLScertNewKeyReenroll() bool { ret, specificReturn := fake.tLScertNewKeyReenrollReturnsOnCall[len(fake.tLScertNewKeyReenrollArgsForCall)] fake.tLScertNewKeyReenrollArgsForCall = append(fake.tLScertNewKeyReenrollArgsForCall, struct { }{}) - stub := fake.TLScertNewKeyReenrollStub - fakeReturns := fake.tLScertNewKeyReenrollReturns fake.recordInvocation("TLScertNewKeyReenroll", []interface{}{}) fake.tLScertNewKeyReenrollMutex.Unlock() - if stub != nil { - return stub() + if fake.TLScertNewKeyReenrollStub != nil { + return fake.TLScertNewKeyReenrollStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.tLScertNewKeyReenrollReturns return fakeReturns.result1 } @@ -1577,16 +1454,15 @@ func (fake *Update) UpgradeDBs() bool { ret, specificReturn := fake.upgradeDBsReturnsOnCall[len(fake.upgradeDBsArgsForCall)] fake.upgradeDBsArgsForCall = append(fake.upgradeDBsArgsForCall, struct { }{}) - stub := fake.UpgradeDBsStub - fakeReturns := fake.upgradeDBsReturns fake.recordInvocation("UpgradeDBs", []interface{}{}) fake.upgradeDBsMutex.Unlock() - if stub != nil { - return stub() + if fake.UpgradeDBsStub != nil { + return fake.UpgradeDBsStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.upgradeDBsReturns return fakeReturns.result1 } @@ -1636,8 +1512,6 @@ func (fake *Update) Invocations() map[string][][]interface{} { defer fake.configOverridesUpdatedMutex.RUnlock() fake.cryptoBackupNeededMutex.RLock() defer fake.cryptoBackupNeededMutex.RUnlock() - fake.dindArgsUpdatedMutex.RLock() - defer fake.dindArgsUpdatedMutex.RUnlock() fake.ecertEnrollMutex.RLock() defer fake.ecertEnrollMutex.RUnlock() fake.ecertNewKeyReenrollMutex.RLock() @@ -1666,8 +1540,6 @@ func (fake *Update) Invocations() map[string][][]interface{} { defer fake.peerTagUpdatedMutex.RUnlock() fake.restartNeededMutex.RLock() defer fake.restartNeededMutex.RUnlock() - fake.setDindArgsUpdatedMutex.RLock() - defer fake.setDindArgsUpdatedMutex.RUnlock() fake.specUpdatedMutex.RLock() defer fake.specUpdatedMutex.RUnlock() fake.tLSCertEnrollMutex.RLock() diff --git a/pkg/offering/base/peer/override/deployment.go b/pkg/offering/base/peer/override/deployment.go index 9fd49162..accf4759 100644 --- a/pkg/offering/base/peer/override/deployment.go +++ b/pkg/offering/base/peer/override/deployment.go @@ -49,7 +49,6 @@ import ( const ( INIT = "init" PEER = "peer" - DIND = "dind" PROXY = "proxy" COUCHDB = "couchdb" COUCHDBINIT = "couchdbinit" @@ -348,27 +347,6 @@ func (o *Override) V1Deployment(instance *current.IBPPeer, deployment *dep.Deplo }) } - dindContainer, err := deployment.GetContainer(DIND) - if err != nil { - return errors.New("dind container not found in deployment") - } - - image := instance.Spec.Images - if image != nil { - dindContainer.SetImage(image.DindImage, image.DindTag) - } - - resourcesRequest := instance.Spec.Resources - if resourcesRequest != nil { - if resourcesRequest.DinD != nil { - err = dindContainer.UpdateResources(resourcesRequest.DinD) - if err != nil { - return errors.Wrap(err, "resource update for dind failed") - } - } - - } - peerContainer := deployment.MustGetContainer(PEER) // env vars only required for 1.x peer peerContainer.AppendEnvIfMissing("CORE_VM_ENDPOINT", "localhost:2375") @@ -381,7 +359,6 @@ func (o *Override) V1Deployment(instance *current.IBPPeer, deployment *dep.Deplo peerContainer.AppendEnvIfMissing("CORE_VM_DOCKER_ATTACHSTDOUT", "false") deployment.UpdateInitContainer(initContainer) - deployment.UpdateContainer(dindContainer) deployment.UpdateContainer(peerContainer) return nil } @@ -472,7 +449,6 @@ func (o *Override) V2Deployment(instance *current.IBPPeer, deployment *dep.Deplo deployment.UpdateInitContainer(initContainer) deployment.UpdateContainer(peerContainer) - deployment.RemoveContainer(DIND) return nil } diff --git a/pkg/offering/base/peer/override/deployment_test.go b/pkg/offering/base/peer/override/deployment_test.go index b03e011b..47ee7dee 100644 --- a/pkg/offering/base/peer/override/deployment_test.go +++ b/pkg/offering/base/peer/override/deployment_test.go @@ -143,7 +143,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { CouchdbPassword: "dbpassword", } testMatrix = [][]resource.Quantity{ - {resource.MustParse("10m"), resource.MustParse("15m"), resource.MustParse("11m"), resource.MustParse("16m"), resource.MustParse("1G"), resource.MustParse("2G")}, + //{resource.MustParse("10m"), resource.MustParse("15m"), resource.MustParse("11m"), resource.MustParse("16m"), resource.MustParse("1G"), resource.MustParse("2G")}, {resource.MustParse("20m"), resource.MustParse("25m"), resource.MustParse("21m"), resource.MustParse("26m"), resource.MustParse("1G"), resource.MustParse("4G")}, {resource.MustParse("30m"), resource.MustParse("35m"), resource.MustParse("31m"), resource.MustParse("36m"), resource.MustParse("3G"), resource.MustParse("6G")}, {resource.MustParse("40m"), resource.MustParse("45m"), resource.MustParse("41m"), resource.MustParse("46m"), resource.MustParse("4G"), resource.MustParse("8G")}, @@ -173,7 +173,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { StateDb: "couchdb", ImagePullSecrets: []string{"pullsecret1"}, Resources: ¤t.PeerResources{ - DinD: &corev1.ResourceRequirements{ + Peer: &corev1.ResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ corev1.ResourceCPU: testMatrix[0][0], corev1.ResourceMemory: testMatrix[0][1], @@ -185,7 +185,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { corev1.ResourceEphemeralStorage: testMatrix[0][5], }, }, - Peer: &corev1.ResourceRequirements{ + GRPCProxy: &corev1.ResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ corev1.ResourceCPU: testMatrix[1][0], corev1.ResourceMemory: testMatrix[1][1], @@ -197,7 +197,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { corev1.ResourceEphemeralStorage: testMatrix[1][5], }, }, - GRPCProxy: &corev1.ResourceRequirements{ + CouchDB: &corev1.ResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ corev1.ResourceCPU: testMatrix[2][0], corev1.ResourceMemory: testMatrix[2][1], @@ -209,28 +209,16 @@ var _ = Describe("Base Peer Deployment Overrides", func() { corev1.ResourceEphemeralStorage: testMatrix[2][5], }, }, - CouchDB: &corev1.ResourceRequirements{ - Requests: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: testMatrix[3][0], - corev1.ResourceMemory: testMatrix[3][1], - corev1.ResourceEphemeralStorage: testMatrix[3][4], - }, - Limits: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: testMatrix[3][2], - corev1.ResourceMemory: testMatrix[3][3], - corev1.ResourceEphemeralStorage: testMatrix[3][5], - }, - }, CCLauncher: &corev1.ResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: testMatrix[5][0], - corev1.ResourceMemory: testMatrix[5][1], - corev1.ResourceEphemeralStorage: testMatrix[5][4], + corev1.ResourceCPU: testMatrix[2][0], + corev1.ResourceMemory: testMatrix[2][1], + corev1.ResourceEphemeralStorage: testMatrix[2][4], }, Limits: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: testMatrix[5][2], - corev1.ResourceMemory: testMatrix[5][3], - corev1.ResourceEphemeralStorage: testMatrix[5][5], + corev1.ResourceCPU: testMatrix[2][2], + corev1.ResourceMemory: testMatrix[2][3], + corev1.ResourceEphemeralStorage: testMatrix[2][5], }, }, }, @@ -267,7 +255,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { Name: "CORE_PEER_ID", Value: instance.Name, } - Expect(deployment.Spec.Template.Spec.Containers[1].Env).To(ContainElement(ev)) + Expect(deployment.Spec.Template.Spec.Containers[0].Env).To(ContainElement(ev)) }) By("setting CORE_PEER_LOCALMSPID env var", func() { @@ -275,7 +263,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { Name: "CORE_PEER_LOCALMSPID", Value: instance.Spec.MSPID, } - Expect(deployment.Spec.Template.Spec.Containers[1].Env).To(ContainElement(ev)) + Expect(deployment.Spec.Template.Spec.Containers[0].Env).To(ContainElement(ev)) }) By("setting db-data volume", func() { @@ -295,7 +283,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { Name: "CORE_LEDGER_STATE_STATEDATABASE", Value: "CouchDB", } - Expect(deployment.Spec.Template.Spec.Containers[1].Env).To(ContainElement(ev)) + Expect(deployment.Spec.Template.Spec.Containers[0].Env).To(ContainElement(ev)) }) By("setting CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME env var", func() { @@ -303,7 +291,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { Name: "CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME", Value: overrider.CouchdbUser, } - Expect(deployment.Spec.Template.Spec.Containers[1].Env).To(ContainElement(ev)) + Expect(deployment.Spec.Template.Spec.Containers[0].Env).To(ContainElement(ev)) }) By("setting CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD env var", func() { @@ -311,7 +299,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { Name: "CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD", Value: overrider.CouchdbPassword, } - Expect(deployment.Spec.Template.Spec.Containers[1].Env).To(ContainElement(ev)) + Expect(deployment.Spec.Template.Spec.Containers[0].Env).To(ContainElement(ev)) }) By("setting COUCHDB_USER env var", func() { @@ -319,7 +307,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { Name: "COUCHDB_USER", Value: overrider.CouchdbUser, } - Expect(deployment.Spec.Template.Spec.Containers[3].Env).To(ContainElement(ev)) + Expect(deployment.Spec.Template.Spec.Containers[2].Env).To(ContainElement(ev)) }) By("setting COUCHDB_PASSWORD env var", func() { @@ -327,7 +315,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { Name: "COUCHDB_PASSWORD", Value: overrider.CouchdbPassword, } - Expect(deployment.Spec.Template.Spec.Containers[3].Env).To(ContainElement(ev)) + Expect(deployment.Spec.Template.Spec.Containers[2].Env).To(ContainElement(ev)) }) By("setting SKIP_PERMISSIONS_UPDATE env var", func() { @@ -335,7 +323,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { Name: "SKIP_PERMISSIONS_UPDATE", Value: "true", } - Expect(deployment.Spec.Template.Spec.Containers[3].Env).To(ContainElement(ev)) + Expect(deployment.Spec.Template.Spec.Containers[2].Env).To(ContainElement(ev)) }) By("setting image pull secret", func() { @@ -376,7 +364,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { Name: "ecert-admincerts", MountPath: "/certs/msp/admincerts", } - Expect(deployment.Spec.Template.Spec.Containers[1].VolumeMounts).To(ContainElement(vm)) + Expect(deployment.Spec.Template.Spec.Containers[0].VolumeMounts).To(ContainElement(vm)) }) By("setting ecert cacerts volume", func() { @@ -476,7 +464,6 @@ var _ = Describe("Base Peer Deployment Overrides", func() { BeforeEach(func() { image = ¤t.PeerImages{ PeerInitImage: "init-image", - DindImage: "dind-image", CouchDBImage: "couchdb-image", PeerImage: "peer-image", GRPCWebImage: "proxy-image", @@ -489,17 +476,15 @@ var _ = Describe("Base Peer Deployment Overrides", func() { err := overrider.Deployment(instance, k8sDep, resources.Create) Expect(err).NotTo(HaveOccurred()) Expect(deployment.Spec.Template.Spec.InitContainers[0].Image).To(Equal("init-image:latest")) - Expect(deployment.Spec.Template.Spec.Containers[0].Image).To(Equal("dind-image:latest")) - Expect(deployment.Spec.Template.Spec.Containers[1].Image).To(Equal("peer-image:latest")) - Expect(deployment.Spec.Template.Spec.Containers[2].Image).To(Equal("proxy-image:latest")) - Expect(deployment.Spec.Template.Spec.Containers[3].Image).To(Equal("couchdb-image:latest")) + Expect(deployment.Spec.Template.Spec.Containers[0].Image).To(Equal("peer-image:latest")) + Expect(deployment.Spec.Template.Spec.Containers[1].Image).To(Equal("proxy-image:latest")) + Expect(deployment.Spec.Template.Spec.Containers[2].Image).To(Equal("couchdb-image:latest")) }) }) When("tag is passed", func() { It("uses the passed in tag for image tags", func() { instance.Spec.Images = image - image.DindTag = "1.0.1" image.CouchDBTag = "1.0.2" image.PeerTag = "1.0.3" image.GRPCWebTag = "1.0.4" @@ -508,10 +493,9 @@ var _ = Describe("Base Peer Deployment Overrides", func() { err := overrider.Deployment(instance, k8sDep, resources.Create) Expect(err).NotTo(HaveOccurred()) Expect(deployment.Spec.Template.Spec.InitContainers[0].Image).To(Equal("init-image:2.0.0")) - Expect(deployment.Spec.Template.Spec.Containers[0].Image).To(Equal("dind-image:1.0.1")) - Expect(deployment.Spec.Template.Spec.Containers[1].Image).To(Equal("peer-image:1.0.3")) - Expect(deployment.Spec.Template.Spec.Containers[2].Image).To(Equal("proxy-image:1.0.4")) - Expect(deployment.Spec.Template.Spec.Containers[3].Image).To(Equal("couchdb-image:1.0.2")) + Expect(deployment.Spec.Template.Spec.Containers[0].Image).To(Equal("peer-image:1.0.3")) + Expect(deployment.Spec.Template.Spec.Containers[1].Image).To(Equal("proxy-image:1.0.4")) + Expect(deployment.Spec.Template.Spec.Containers[2].Image).To(Equal("couchdb-image:1.0.2")) }) }) @@ -540,13 +524,13 @@ var _ = Describe("Base Peer Deployment Overrides", func() { ccLauncher := deployment.MustGetContainer("chaincode-launcher") By("setting resources from spec", func() { - Expect(ccLauncher.Resources.Requests[corev1.ResourceCPU]).To(Equal(testMatrix[5][0])) - Expect(ccLauncher.Resources.Requests[corev1.ResourceMemory]).To(Equal(testMatrix[5][1])) - Expect(ccLauncher.Resources.Requests[corev1.ResourceEphemeralStorage]).To(Equal(testMatrix[5][4])) + Expect(ccLauncher.Resources.Requests[corev1.ResourceCPU]).To(Equal(testMatrix[2][0])) + Expect(ccLauncher.Resources.Requests[corev1.ResourceMemory]).To(Equal(testMatrix[2][1])) + Expect(ccLauncher.Resources.Requests[corev1.ResourceEphemeralStorage]).To(Equal(testMatrix[2][4])) - Expect(ccLauncher.Resources.Limits[corev1.ResourceCPU]).To(Equal(testMatrix[5][2])) - Expect(ccLauncher.Resources.Limits[corev1.ResourceMemory]).To(Equal(testMatrix[5][3])) - Expect(ccLauncher.Resources.Limits[corev1.ResourceEphemeralStorage]).To(Equal(testMatrix[5][5])) + Expect(ccLauncher.Resources.Limits[corev1.ResourceCPU]).To(Equal(testMatrix[2][2])) + Expect(ccLauncher.Resources.Limits[corev1.ResourceMemory]).To(Equal(testMatrix[2][3])) + Expect(ccLauncher.Resources.Limits[corev1.ResourceEphemeralStorage]).To(Equal(testMatrix[2][5])) }) By("setting envs with the requestes images/spec", func() { @@ -595,7 +579,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { SubPath: "data", } Expect(deployment.Spec.Template.Spec.InitContainers[0].VolumeMounts).To(ContainElement(vm)) - Expect(deployment.Spec.Template.Spec.Containers[1].VolumeMounts).To(ContainElement(vm)) + Expect(deployment.Spec.Template.Spec.Containers[0].VolumeMounts).To(ContainElement(vm)) }) By("setting CORE_LEDGER_STATE_STATEDATABASE env var", func() { @@ -603,7 +587,7 @@ var _ = Describe("Base Peer Deployment Overrides", func() { Name: "CORE_LEDGER_STATE_STATEDATABASE", Value: "goleveldb", } - Expect(deployment.Spec.Template.Spec.Containers[1].Env).To(ContainElement(ev)) + Expect(deployment.Spec.Template.Spec.Containers[0].Env).To(ContainElement(ev)) }) }) }) @@ -645,7 +629,6 @@ var _ = Describe("Base Peer Deployment Overrides", func() { BeforeEach(func() { image = ¤t.PeerImages{ PeerInitImage: "init-image", - DindImage: "dind-image", CouchDBImage: "couchdb-image", PeerImage: "peer-image", GRPCWebImage: "proxy-image", @@ -658,16 +641,14 @@ var _ = Describe("Base Peer Deployment Overrides", func() { err := overrider.Deployment(instance, k8sDep, resources.Update) Expect(err).NotTo(HaveOccurred()) Expect(deployment.Spec.Template.Spec.InitContainers[0].Image).To(Equal("init-image:latest")) - Expect(deployment.Spec.Template.Spec.Containers[0].Image).To(Equal("dind-image:latest")) - Expect(deployment.Spec.Template.Spec.Containers[1].Image).To(Equal("peer-image:latest")) - Expect(deployment.Spec.Template.Spec.Containers[2].Image).To(Equal("proxy-image:latest")) - Expect(deployment.Spec.Template.Spec.Containers[3].Image).To(Equal("couchdb-image:latest")) + Expect(deployment.Spec.Template.Spec.Containers[0].Image).To(Equal("peer-image:latest")) + Expect(deployment.Spec.Template.Spec.Containers[1].Image).To(Equal("proxy-image:latest")) + Expect(deployment.Spec.Template.Spec.Containers[2].Image).To(Equal("couchdb-image:latest")) }) }) When("tag is passed", func() { It("uses the passed in tag for image tags", func() { - image.DindTag = "1.0.1" image.CouchDBTag = "1.0.2" image.PeerTag = "1.0.3" image.GRPCWebTag = "1.0.4" @@ -676,10 +657,9 @@ var _ = Describe("Base Peer Deployment Overrides", func() { err := overrider.Deployment(instance, k8sDep, resources.Update) Expect(err).NotTo(HaveOccurred()) Expect(deployment.Spec.Template.Spec.InitContainers[0].Image).To(Equal("init-image:2.0.0")) - Expect(deployment.Spec.Template.Spec.Containers[0].Image).To(Equal("dind-image:1.0.1")) - Expect(deployment.Spec.Template.Spec.Containers[1].Image).To(Equal("peer-image:1.0.3")) - Expect(deployment.Spec.Template.Spec.Containers[2].Image).To(Equal("proxy-image:1.0.4")) - Expect(deployment.Spec.Template.Spec.Containers[3].Image).To(Equal("couchdb-image:1.0.2")) + Expect(deployment.Spec.Template.Spec.Containers[0].Image).To(Equal("peer-image:1.0.3")) + Expect(deployment.Spec.Template.Spec.Containers[1].Image).To(Equal("proxy-image:1.0.4")) + Expect(deployment.Spec.Template.Spec.Containers[2].Image).To(Equal("couchdb-image:1.0.2")) }) }) }) diff --git a/pkg/offering/base/peer/peer.go b/pkg/offering/base/peer/peer.go index 643be0f3..7cb15456 100644 --- a/pkg/offering/base/peer/peer.go +++ b/pkg/offering/base/peer/peer.go @@ -140,12 +140,10 @@ type RestartManager interface { type Update interface { SpecUpdated() bool ConfigOverridesUpdated() bool - DindArgsUpdated() bool TLSCertUpdated() bool EcertUpdated() bool PeerTagUpdated() bool CertificateUpdated() bool - SetDindArgsUpdated(updated bool) RestartNeeded() bool EcertReenrollNeeded() bool TLSReenrollNeeded() bool @@ -316,15 +314,14 @@ func (p *Peer) PreReconcileChecks(instance *current.IBPPeer, update Update) (boo } dbTypeUpdated := p.CheckDBType(instance) - updated := dbTypeUpdated || zoneUpdated || regionUpdated || update.DindArgsUpdated() || hsmImageUpdated || replicasUpdated || imagesUpdated + updated := dbTypeUpdated || zoneUpdated || regionUpdated || hsmImageUpdated || replicasUpdated || imagesUpdated if updated { log.Info(fmt.Sprintf( - "dbTypeUpdate %t, zoneUpdated %t, regionUpdated %t, dindArgsUpdated %t, hsmImageUpdated %t, replicasUpdated %t, imagesUpdated %t", + "dbTypeUpdate %t, zoneUpdated %t, regionUpdated %t, hsmImageUpdated %t, replicasUpdated %t, imagesUpdated %t", dbTypeUpdated, zoneUpdated, regionUpdated, - update.DindArgsUpdated(), hsmImageUpdated, replicasUpdated, imagesUpdated)) diff --git a/pkg/offering/base/peer/peer_test.go b/pkg/offering/base/peer/peer_test.go index 524e54a9..f646a6c4 100644 --- a/pkg/offering/base/peer/peer_test.go +++ b/pkg/offering/base/peer/peer_test.go @@ -992,8 +992,6 @@ var _ = Describe("Base Peer", func() { PeerInitTag: "2.0.0", PeerImage: "peerimage", PeerTag: "2.0.0", - DindImage: "dindimage", - DindTag: "2.0.0", CouchDBImage: "couchimage", CouchDBTag: "2.0.0", GRPCWebImage: "grpcimage", @@ -1007,8 +1005,6 @@ var _ = Describe("Base Peer", func() { Expect(images.PeerInitTag).To(Equal("2.0.0")) Expect(images.PeerImage).To(Equal("ghcr.io/ibm-blockchain/peerimage")) Expect(images.PeerTag).To(Equal("2.0.0")) - Expect(images.DindImage).To(Equal("ghcr.io/ibm-blockchain/dindimage")) - Expect(images.DindTag).To(Equal("2.0.0")) Expect(images.CouchDBImage).To(Equal("ghcr.io/ibm-blockchain/couchimage")) Expect(images.CouchDBTag).To(Equal("2.0.0")) Expect(images.GRPCWebImage).To(Equal("ghcr.io/ibm-blockchain/grpcimage")) @@ -1021,8 +1017,6 @@ var _ = Describe("Base Peer", func() { Expect(images.PeerInitTag).To(Equal("2.0.0")) Expect(images.PeerImage).To(Equal("ghcr.io/ibm-blockchain/images/peerimage")) Expect(images.PeerTag).To(Equal("2.0.0")) - Expect(images.DindImage).To(Equal("ghcr.io/ibm-blockchain/images/dindimage")) - Expect(images.DindTag).To(Equal("2.0.0")) Expect(images.CouchDBImage).To(Equal("ghcr.io/ibm-blockchain/images/couchimage")) Expect(images.CouchDBTag).To(Equal("2.0.0")) Expect(images.GRPCWebImage).To(Equal("ghcr.io/ibm-blockchain/images/grpcimage")) @@ -1038,8 +1032,6 @@ var _ = Describe("Base Peer", func() { PeerInitTag: "2.0.0", PeerImage: "ghcr.io/ibm-blockchain/peerimage", PeerTag: "2.0.0", - DindImage: "ghcr.io/ibm-blockchain/dindimage", - DindTag: "2.0.0", CouchDBImage: "ghcr.io/ibm-blockchain/couchimage", CouchDBTag: "2.0.0", GRPCWebImage: "ghcr.io/ibm-blockchain/grpcimage", @@ -1053,8 +1045,6 @@ var _ = Describe("Base Peer", func() { Expect(images.PeerInitTag).To(Equal("2.0.0")) Expect(images.PeerImage).To(Equal("ghcr.io/ibm-blockchain/peerimage")) Expect(images.PeerTag).To(Equal("2.0.0")) - Expect(images.DindImage).To(Equal("ghcr.io/ibm-blockchain/dindimage")) - Expect(images.DindTag).To(Equal("2.0.0")) Expect(images.CouchDBImage).To(Equal("ghcr.io/ibm-blockchain/couchimage")) Expect(images.CouchDBTag).To(Equal("2.0.0")) Expect(images.GRPCWebImage).To(Equal("ghcr.io/ibm-blockchain/grpcimage")) diff --git a/pkg/offering/common/reconcilechecks/images/fabricversion_test.go b/pkg/offering/common/reconcilechecks/images/fabricversion_test.go index 7c535ea0..c8e576b8 100644 --- a/pkg/offering/common/reconcilechecks/images/fabricversion_test.go +++ b/pkg/offering/common/reconcilechecks/images/fabricversion_test.go @@ -72,8 +72,6 @@ var _ = Describe("fabric version", func() { PeerInitTag: "2.5.1-2511004-amd64", PeerImage: "ibp-peer", PeerTag: "1.4.9-2511004-amd64", - DindImage: "ibp-dind", - DindTag: "noimages-amd64", CouchDBImage: "ibp-couchdb", CouchDBTag: "2.3.1-2511004-amd64", GRPCWebImage: "ibp-grpcweb", @@ -90,8 +88,6 @@ var _ = Describe("fabric version", func() { PeerInitTag: "2.5.1-2511004-amd64", PeerImage: "ibp-peer", PeerTag: "2.2.1-2511004-amd64", - DindImage: "ibp-dind", - DindTag: "noimages-amd64", CouchDBImage: "ibp-couchdb", CouchDBTag: "2.3.1-2511004-amd64", GRPCWebImage: "ibp-grpcweb", @@ -108,8 +104,6 @@ var _ = Describe("fabric version", func() { PeerInitTag: "2.5.1-2511004-amd64", PeerImage: "ibp-peer", PeerTag: "2.2.1-2511204-amd64", - DindImage: "ibp-dind", - DindTag: "noimages-amd64", CouchDBImage: "ibp-couchdb", CouchDBTag: "2.3.1-2511004-amd64", GRPCWebImage: "ibp-grpcweb", diff --git a/pkg/offering/common/reconcilechecks/images/images_test.go b/pkg/offering/common/reconcilechecks/images/images_test.go index 7091dcc1..c39373d9 100644 --- a/pkg/offering/common/reconcilechecks/images/images_test.go +++ b/pkg/offering/common/reconcilechecks/images/images_test.go @@ -72,8 +72,6 @@ var _ = Describe("default images", func() { PeerInitTag: "2.5.1-2511004-amd64", PeerImage: "ibp-peer", PeerTag: "1.4.9-2511004-amd64", - DindImage: "ibp-dind", - DindTag: "noimages-amd64", CouchDBImage: "ibp-couchdb", CouchDBTag: "2.3.1-2511004-amd64", GRPCWebImage: "ibp-grpcweb", @@ -90,8 +88,6 @@ var _ = Describe("default images", func() { PeerInitTag: "2.5.1-2511004-amd64", PeerImage: "ibp-peer", PeerTag: "2.2.1-2511004-amd64", - DindImage: "ibp-dind", - DindTag: "noimages-amd64", CouchDBImage: "ibp-couchdb", CouchDBTag: "2.3.1-2511004-amd64", GRPCWebImage: "ibp-grpcweb", @@ -108,8 +104,6 @@ var _ = Describe("default images", func() { PeerInitTag: "2.5.1-2511004-amd64", PeerImage: "ibp-peer", PeerTag: "2.2.1-2511204-amd64", - DindImage: "ibp-dind", - DindTag: "noimages-amd64", CouchDBImage: "ibp-couchdb", CouchDBTag: "2.3.1-2511004-amd64", GRPCWebImage: "ibp-grpcweb", @@ -335,8 +329,6 @@ var _ = Describe("default images", func() { PeerInitTag: "2.5.1-2511004-amd64", PeerImage: "ibp-peer", PeerTag: "2.2.1-2511204-amd64", - DindImage: "ibp-dind", - DindTag: "noimages-amd64", CouchDBImage: "ibp-couchdb", CouchDBTag: "2.3.1-2511004-amd64", GRPCWebImage: "ibp-grpcweb", @@ -349,8 +341,6 @@ var _ = Describe("default images", func() { Expect(instance.Spec.Images.PeerInitTag).To(Equal(peerImages.PeerInitTag)) Expect(instance.Spec.Images.PeerImage).To(Equal(peerImages.PeerImage)) Expect(instance.Spec.Images.PeerTag).To(Equal(peerImages.PeerTag)) - Expect(instance.Spec.Images.DindImage).To(Equal(peerImages.DindImage)) - Expect(instance.Spec.Images.DindTag).To(Equal(peerImages.DindTag)) Expect(instance.Spec.Images.CouchDBImage).To(Equal(peerImages.CouchDBImage)) Expect(instance.Spec.Images.CouchDBTag).To(Equal(peerImages.CouchDBTag)) Expect(instance.Spec.Images.GRPCWebImage).To(Equal(peerImages.GRPCWebImage)) @@ -369,8 +359,6 @@ var _ = Describe("default images", func() { PeerInitTag: "2.5.1-2511004-amd64", PeerImage: "ghcr.io/ibm-blockchain/ibp-peer", PeerTag: "2.2.1-2511204-amd64", - DindImage: "ghcr.io/ibm-blockchain/ibp-dind", - DindTag: "noimages-amd64", CouchDBImage: "ghcr.io/ibm-blockchain/ibp-couchdb", CouchDBTag: "2.3.1-2511004-amd64", GRPCWebImage: "ghcr.io/ibm-blockchain/ibp-grpcweb", @@ -383,8 +371,6 @@ var _ = Describe("default images", func() { Expect(instance.Spec.Images.PeerInitTag).To(Equal(peerImages.PeerInitTag)) Expect(instance.Spec.Images.PeerImage).To(Equal(peerImages.PeerImage)) Expect(instance.Spec.Images.PeerTag).To(Equal(peerImages.PeerTag)) - Expect(instance.Spec.Images.DindImage).To(Equal(peerImages.DindImage)) - Expect(instance.Spec.Images.DindTag).To(Equal(peerImages.DindTag)) Expect(instance.Spec.Images.CouchDBImage).To(Equal(peerImages.CouchDBImage)) Expect(instance.Spec.Images.CouchDBTag).To(Equal(peerImages.CouchDBTag)) Expect(instance.Spec.Images.GRPCWebImage).To(Equal(peerImages.GRPCWebImage)) @@ -409,8 +395,6 @@ var _ = Describe("default images", func() { PeerInitTag: "2.5.1-2511004-amd64", PeerImage: "ghcr.io/ibm-blockchain/ibp-peer", PeerTag: "2.2.1-2511004-amd64", - DindImage: "ghcr.io/ibm-blockchain/ibp-dind", - DindTag: "noimages-amd64", CouchDBImage: "ghcr.io/ibm-blockchain/ibp-couchdb", CouchDBTag: "2.3.1-2511004-amd64", GRPCWebImage: "ghcr.io/ibm-blockchain/ibp-grpcweb", @@ -423,8 +407,6 @@ var _ = Describe("default images", func() { Expect(instance.Spec.Images.PeerInitTag).To(Equal(peerImages.PeerInitTag)) Expect(instance.Spec.Images.PeerImage).To(Equal(peerImages.PeerImage)) Expect(instance.Spec.Images.PeerTag).To(Equal(peerImages.PeerTag)) - Expect(instance.Spec.Images.DindImage).To(Equal(peerImages.DindImage)) - Expect(instance.Spec.Images.DindTag).To(Equal(peerImages.DindTag)) Expect(instance.Spec.Images.CouchDBImage).To(Equal(peerImages.CouchDBImage)) Expect(instance.Spec.Images.CouchDBTag).To(Equal(peerImages.CouchDBTag)) Expect(instance.Spec.Images.GRPCWebImage).To(Equal(peerImages.GRPCWebImage)) diff --git a/pkg/offering/common/reconcilechecks/images/mocks/fabricversion.go b/pkg/offering/common/reconcilechecks/images/mocks/fabricversion.go index f2a31ca0..b9fc1d95 100644 --- a/pkg/offering/common/reconcilechecks/images/mocks/fabricversion.go +++ b/pkg/offering/common/reconcilechecks/images/mocks/fabricversion.go @@ -27,16 +27,15 @@ func (fake *FabricVersionInstance) GetFabricVersion() string { ret, specificReturn := fake.getFabricVersionReturnsOnCall[len(fake.getFabricVersionArgsForCall)] fake.getFabricVersionArgsForCall = append(fake.getFabricVersionArgsForCall, struct { }{}) - stub := fake.GetFabricVersionStub - fakeReturns := fake.getFabricVersionReturns fake.recordInvocation("GetFabricVersion", []interface{}{}) fake.getFabricVersionMutex.Unlock() - if stub != nil { - return stub() + if fake.GetFabricVersionStub != nil { + return fake.GetFabricVersionStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getFabricVersionReturns return fakeReturns.result1 } diff --git a/pkg/offering/common/reconcilechecks/images/mocks/instance.go b/pkg/offering/common/reconcilechecks/images/mocks/instance.go index c8a50258..94255a28 100644 --- a/pkg/offering/common/reconcilechecks/images/mocks/instance.go +++ b/pkg/offering/common/reconcilechecks/images/mocks/instance.go @@ -62,16 +62,15 @@ func (fake *Instance) GetArch() []string { ret, specificReturn := fake.getArchReturnsOnCall[len(fake.getArchArgsForCall)] fake.getArchArgsForCall = append(fake.getArchArgsForCall, struct { }{}) - stub := fake.GetArchStub - fakeReturns := fake.getArchReturns fake.recordInvocation("GetArch", []interface{}{}) fake.getArchMutex.Unlock() - if stub != nil { - return stub() + if fake.GetArchStub != nil { + return fake.GetArchStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getArchReturns return fakeReturns.result1 } @@ -115,16 +114,15 @@ func (fake *Instance) GetFabricVersion() string { ret, specificReturn := fake.getFabricVersionReturnsOnCall[len(fake.getFabricVersionArgsForCall)] fake.getFabricVersionArgsForCall = append(fake.getFabricVersionArgsForCall, struct { }{}) - stub := fake.GetFabricVersionStub - fakeReturns := fake.getFabricVersionReturns fake.recordInvocation("GetFabricVersion", []interface{}{}) fake.getFabricVersionMutex.Unlock() - if stub != nil { - return stub() + if fake.GetFabricVersionStub != nil { + return fake.GetFabricVersionStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getFabricVersionReturns return fakeReturns.result1 } @@ -168,16 +166,15 @@ func (fake *Instance) GetRegistryURL() string { ret, specificReturn := fake.getRegistryURLReturnsOnCall[len(fake.getRegistryURLArgsForCall)] fake.getRegistryURLArgsForCall = append(fake.getRegistryURLArgsForCall, struct { }{}) - stub := fake.GetRegistryURLStub - fakeReturns := fake.getRegistryURLReturns fake.recordInvocation("GetRegistryURL", []interface{}{}) fake.getRegistryURLMutex.Unlock() - if stub != nil { - return stub() + if fake.GetRegistryURLStub != nil { + return fake.GetRegistryURLStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getRegistryURLReturns return fakeReturns.result1 } @@ -221,16 +218,15 @@ func (fake *Instance) ImagesSet() bool { ret, specificReturn := fake.imagesSetReturnsOnCall[len(fake.imagesSetArgsForCall)] fake.imagesSetArgsForCall = append(fake.imagesSetArgsForCall, struct { }{}) - stub := fake.ImagesSetStub - fakeReturns := fake.imagesSetReturns fake.recordInvocation("ImagesSet", []interface{}{}) fake.imagesSetMutex.Unlock() - if stub != nil { - return stub() + if fake.ImagesSetStub != nil { + return fake.ImagesSetStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.imagesSetReturns return fakeReturns.result1 } @@ -274,10 +270,9 @@ func (fake *Instance) SetFabricVersion(arg1 string) { fake.setFabricVersionArgsForCall = append(fake.setFabricVersionArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetFabricVersionStub fake.recordInvocation("SetFabricVersion", []interface{}{arg1}) fake.setFabricVersionMutex.Unlock() - if stub != nil { + if fake.SetFabricVersionStub != nil { fake.SetFabricVersionStub(arg1) } } diff --git a/pkg/offering/common/reconcilechecks/images/mocks/update.go b/pkg/offering/common/reconcilechecks/images/mocks/update.go index 33890af9..d963d0c1 100644 --- a/pkg/offering/common/reconcilechecks/images/mocks/update.go +++ b/pkg/offering/common/reconcilechecks/images/mocks/update.go @@ -37,16 +37,15 @@ func (fake *Update) FabricVersionUpdated() bool { ret, specificReturn := fake.fabricVersionUpdatedReturnsOnCall[len(fake.fabricVersionUpdatedArgsForCall)] fake.fabricVersionUpdatedArgsForCall = append(fake.fabricVersionUpdatedArgsForCall, struct { }{}) - stub := fake.FabricVersionUpdatedStub - fakeReturns := fake.fabricVersionUpdatedReturns fake.recordInvocation("FabricVersionUpdated", []interface{}{}) fake.fabricVersionUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.FabricVersionUpdatedStub != nil { + return fake.FabricVersionUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.fabricVersionUpdatedReturns return fakeReturns.result1 } @@ -90,16 +89,15 @@ func (fake *Update) ImagesUpdated() bool { ret, specificReturn := fake.imagesUpdatedReturnsOnCall[len(fake.imagesUpdatedArgsForCall)] fake.imagesUpdatedArgsForCall = append(fake.imagesUpdatedArgsForCall, struct { }{}) - stub := fake.ImagesUpdatedStub - fakeReturns := fake.imagesUpdatedReturns fake.recordInvocation("ImagesUpdated", []interface{}{}) fake.imagesUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.ImagesUpdatedStub != nil { + return fake.ImagesUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.imagesUpdatedReturns return fakeReturns.result1 } diff --git a/pkg/offering/common/reconcilechecks/mocks/image.go b/pkg/offering/common/reconcilechecks/mocks/image.go index 6138861e..f9f6fa1d 100644 --- a/pkg/offering/common/reconcilechecks/mocks/image.go +++ b/pkg/offering/common/reconcilechecks/mocks/image.go @@ -41,16 +41,15 @@ func (fake *Image) SetDefaults(arg1 images.Instance) error { fake.setDefaultsArgsForCall = append(fake.setDefaultsArgsForCall, struct { arg1 images.Instance }{arg1}) - stub := fake.SetDefaultsStub - fakeReturns := fake.setDefaultsReturns fake.recordInvocation("SetDefaults", []interface{}{arg1}) fake.setDefaultsMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.SetDefaultsStub != nil { + return fake.SetDefaultsStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.setDefaultsReturns return fakeReturns.result1 } @@ -102,16 +101,15 @@ func (fake *Image) UpdateRequired(arg1 images.Update) bool { fake.updateRequiredArgsForCall = append(fake.updateRequiredArgsForCall, struct { arg1 images.Update }{arg1}) - stub := fake.UpdateRequiredStub - fakeReturns := fake.updateRequiredReturns fake.recordInvocation("UpdateRequired", []interface{}{arg1}) fake.updateRequiredMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.UpdateRequiredStub != nil { + return fake.UpdateRequiredStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.updateRequiredReturns return fakeReturns.result1 } diff --git a/pkg/offering/common/reconcilechecks/mocks/instance.go b/pkg/offering/common/reconcilechecks/mocks/instance.go index 48fd8258..b5548591 100644 --- a/pkg/offering/common/reconcilechecks/mocks/instance.go +++ b/pkg/offering/common/reconcilechecks/mocks/instance.go @@ -62,16 +62,15 @@ func (fake *Instance) GetArch() []string { ret, specificReturn := fake.getArchReturnsOnCall[len(fake.getArchArgsForCall)] fake.getArchArgsForCall = append(fake.getArchArgsForCall, struct { }{}) - stub := fake.GetArchStub - fakeReturns := fake.getArchReturns fake.recordInvocation("GetArch", []interface{}{}) fake.getArchMutex.Unlock() - if stub != nil { - return stub() + if fake.GetArchStub != nil { + return fake.GetArchStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getArchReturns return fakeReturns.result1 } @@ -115,16 +114,15 @@ func (fake *Instance) GetFabricVersion() string { ret, specificReturn := fake.getFabricVersionReturnsOnCall[len(fake.getFabricVersionArgsForCall)] fake.getFabricVersionArgsForCall = append(fake.getFabricVersionArgsForCall, struct { }{}) - stub := fake.GetFabricVersionStub - fakeReturns := fake.getFabricVersionReturns fake.recordInvocation("GetFabricVersion", []interface{}{}) fake.getFabricVersionMutex.Unlock() - if stub != nil { - return stub() + if fake.GetFabricVersionStub != nil { + return fake.GetFabricVersionStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getFabricVersionReturns return fakeReturns.result1 } @@ -168,16 +166,15 @@ func (fake *Instance) GetRegistryURL() string { ret, specificReturn := fake.getRegistryURLReturnsOnCall[len(fake.getRegistryURLArgsForCall)] fake.getRegistryURLArgsForCall = append(fake.getRegistryURLArgsForCall, struct { }{}) - stub := fake.GetRegistryURLStub - fakeReturns := fake.getRegistryURLReturns fake.recordInvocation("GetRegistryURL", []interface{}{}) fake.getRegistryURLMutex.Unlock() - if stub != nil { - return stub() + if fake.GetRegistryURLStub != nil { + return fake.GetRegistryURLStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.getRegistryURLReturns return fakeReturns.result1 } @@ -221,16 +218,15 @@ func (fake *Instance) ImagesSet() bool { ret, specificReturn := fake.imagesSetReturnsOnCall[len(fake.imagesSetArgsForCall)] fake.imagesSetArgsForCall = append(fake.imagesSetArgsForCall, struct { }{}) - stub := fake.ImagesSetStub - fakeReturns := fake.imagesSetReturns fake.recordInvocation("ImagesSet", []interface{}{}) fake.imagesSetMutex.Unlock() - if stub != nil { - return stub() + if fake.ImagesSetStub != nil { + return fake.ImagesSetStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.imagesSetReturns return fakeReturns.result1 } @@ -274,10 +270,9 @@ func (fake *Instance) SetFabricVersion(arg1 string) { fake.setFabricVersionArgsForCall = append(fake.setFabricVersionArgsForCall, struct { arg1 string }{arg1}) - stub := fake.SetFabricVersionStub fake.recordInvocation("SetFabricVersion", []interface{}{arg1}) fake.setFabricVersionMutex.Unlock() - if stub != nil { + if fake.SetFabricVersionStub != nil { fake.SetFabricVersionStub(arg1) } } diff --git a/pkg/offering/common/reconcilechecks/mocks/update.go b/pkg/offering/common/reconcilechecks/mocks/update.go index d5fd4b11..438cb198 100644 --- a/pkg/offering/common/reconcilechecks/mocks/update.go +++ b/pkg/offering/common/reconcilechecks/mocks/update.go @@ -37,16 +37,15 @@ func (fake *Update) FabricVersionUpdated() bool { ret, specificReturn := fake.fabricVersionUpdatedReturnsOnCall[len(fake.fabricVersionUpdatedArgsForCall)] fake.fabricVersionUpdatedArgsForCall = append(fake.fabricVersionUpdatedArgsForCall, struct { }{}) - stub := fake.FabricVersionUpdatedStub - fakeReturns := fake.fabricVersionUpdatedReturns fake.recordInvocation("FabricVersionUpdated", []interface{}{}) fake.fabricVersionUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.FabricVersionUpdatedStub != nil { + return fake.FabricVersionUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.fabricVersionUpdatedReturns return fakeReturns.result1 } @@ -90,16 +89,15 @@ func (fake *Update) ImagesUpdated() bool { ret, specificReturn := fake.imagesUpdatedReturnsOnCall[len(fake.imagesUpdatedArgsForCall)] fake.imagesUpdatedArgsForCall = append(fake.imagesUpdatedArgsForCall, struct { }{}) - stub := fake.ImagesUpdatedStub - fakeReturns := fake.imagesUpdatedReturns fake.recordInvocation("ImagesUpdated", []interface{}{}) fake.imagesUpdatedMutex.Unlock() - if stub != nil { - return stub() + if fake.ImagesUpdatedStub != nil { + return fake.ImagesUpdatedStub() } if specificReturn { return ret.result1 } + fakeReturns := fake.imagesUpdatedReturns return fakeReturns.result1 } diff --git a/pkg/offering/common/reconcilechecks/mocks/version.go b/pkg/offering/common/reconcilechecks/mocks/version.go index 9ee3e384..9db328f4 100644 --- a/pkg/offering/common/reconcilechecks/mocks/version.go +++ b/pkg/offering/common/reconcilechecks/mocks/version.go @@ -41,16 +41,15 @@ func (fake *Version) Normalize(arg1 images.FabricVersionInstance) string { fake.normalizeArgsForCall = append(fake.normalizeArgsForCall, struct { arg1 images.FabricVersionInstance }{arg1}) - stub := fake.NormalizeStub - fakeReturns := fake.normalizeReturns fake.recordInvocation("Normalize", []interface{}{arg1}) fake.normalizeMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.NormalizeStub != nil { + return fake.NormalizeStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.normalizeReturns return fakeReturns.result1 } @@ -102,16 +101,15 @@ func (fake *Version) Validate(arg1 images.FabricVersionInstance) error { fake.validateArgsForCall = append(fake.validateArgsForCall, struct { arg1 images.FabricVersionInstance }{arg1}) - stub := fake.ValidateStub - fakeReturns := fake.validateReturns fake.recordInvocation("Validate", []interface{}{arg1}) fake.validateMutex.Unlock() - if stub != nil { - return stub(arg1) + if fake.ValidateStub != nil { + return fake.ValidateStub(arg1) } if specificReturn { return ret.result1 } + fakeReturns := fake.validateReturns return fakeReturns.result1 } diff --git a/pkg/offering/k8s/console/override/deployercm_test.go b/pkg/offering/k8s/console/override/deployercm_test.go index e0d59d68..da0c2faa 100644 --- a/pkg/offering/k8s/console/override/deployercm_test.go +++ b/pkg/offering/k8s/console/override/deployercm_test.go @@ -79,8 +79,6 @@ var _ = Describe("K8S Console Deployer Config Map Overrides", func() { PeerInitTag: "1.4.6", PeerImage: "peer-image", PeerTag: "1.4.6", - DindImage: "dind-iamge", - DindTag: "1.4.6", GRPCWebImage: "grpcweb-image", GRPCWebTag: "1.4.6", CouchDBImage: "couchdb-image", @@ -203,8 +201,6 @@ var _ = Describe("K8S Console Deployer Config Map Overrides", func() { PeerInitTag: "1.4.6", PeerImage: fmt.Sprintf("%speer-image", instance.Spec.RegistryURL), PeerTag: "1.4.6", - DindImage: fmt.Sprintf("%sdind-iamge", instance.Spec.RegistryURL), - DindTag: "1.4.6", GRPCWebImage: fmt.Sprintf("%sgrpcweb-image", instance.Spec.RegistryURL), GRPCWebTag: "1.4.6", CouchDBImage: fmt.Sprintf("%scouchdb-image", instance.Spec.RegistryURL), diff --git a/pkg/offering/openshift/console/override/deployercm_test.go b/pkg/offering/openshift/console/override/deployercm_test.go index bba45577..0e825117 100644 --- a/pkg/offering/openshift/console/override/deployercm_test.go +++ b/pkg/offering/openshift/console/override/deployercm_test.go @@ -76,8 +76,6 @@ var _ = Describe("Openshift Console Deployer Config Map Overrides", func() { PeerInitTag: "1.4.6", PeerImage: "peer-image", PeerTag: "1.4.6", - DindImage: "dind-iamge", - DindTag: "1.4.6", GRPCWebImage: "grpcweb-image", GRPCWebTag: "1.4.6", CouchDBImage: "couchdb-image", @@ -186,8 +184,6 @@ var _ = Describe("Openshift Console Deployer Config Map Overrides", func() { PeerInitTag: "1.4.6", PeerImage: "peer-image", PeerTag: "1.4.6", - DindImage: "dind-iamge", - DindTag: "1.4.6", GRPCWebImage: "grpcweb-image", GRPCWebTag: "1.4.6", CouchDBImage: "couchdb-image", diff --git a/pkg/offering/openshift/peer/peer.go b/pkg/offering/openshift/peer/peer.go index 1f4e85b4..6258fb80 100644 --- a/pkg/offering/openshift/peer/peer.go +++ b/pkg/offering/openshift/peer/peer.go @@ -34,7 +34,6 @@ import ( "github.com/IBM-Blockchain/fabric-operator/pkg/offering/openshift/peer/override" "github.com/IBM-Blockchain/fabric-operator/pkg/operatorerrors" "github.com/IBM-Blockchain/fabric-operator/version" - openshiftv1 "github.com/openshift/api/config/v1" routev1 "github.com/openshift/api/route/v1" "github.com/pkg/errors" "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" @@ -135,12 +134,6 @@ func (p *Peer) Reconcile(instance *current.IBPPeer, update basepeer.Update) (com }, nil } - updatecr, err := p.SelectDinDArgs(instance) - if err != nil { - log.Info("Cannot get cluster version. Ignoring openshift cluster version") - } - - update.SetDindArgsUpdated(updatecr) instanceUpdated, err := p.PreReconcileChecks(instance, update) if err != nil { return common.Result{}, errors.Wrap(err, "failed pre reconcile checks") @@ -290,23 +283,3 @@ func (p *Peer) Reconcile(instance *current.IBPPeer, update basepeer.Update) (com Status: status, }, nil } - -func (p *Peer) SelectDinDArgs(instance *current.IBPPeer) (bool, error) { - - if len(instance.Spec.DindArgs) != 0 { - return false, nil - } - - clusterversion := openshiftv1.ClusterVersion{} - - err := p.RestClient.RESTClient().Get(). - AbsPath("apis", "config.openshift.io", "v1", "clusterversions", "version"). - Do(context.TODO()). - Into(&clusterversion) - - if err != nil { - return false, err - } - - return true, nil -} diff --git a/pkg/offering/openshift/peer/peer_test.go b/pkg/offering/openshift/peer/peer_test.go index b5afb035..922031b6 100644 --- a/pkg/offering/openshift/peer/peer_test.go +++ b/pkg/offering/openshift/peer/peer_test.go @@ -74,7 +74,6 @@ var _ = Describe("Openshift Peer", func() { Spec: current.IBPPeerSpec{ PeerExternalEndpoint: "address", Domain: "domain", - DindArgs: []string{"fake", "args"}, StateDb: "couchdb", Replicas: &replicas, Images: ¤t.PeerImages{}, @@ -179,29 +178,6 @@ var _ = Describe("Openshift Peer", func() { Expect(err.Error()).To(Equal("failed to reconcile managers: failed Peer GRPC Route reconciliation: failed to reconcile grpc web route")) }) - // Disabling this test because the function uses rest client which cannot be mocked - // It("adds dind args in CR if not passed", func() { - // mockKubeClient.GetStub = func(ctx context.Context, types types.NamespacedName, obj client.Object) error { - // switch obj.(type) { - // case *openshiftv1.ClusterVersion: - // cv := &openshiftv1.ClusterVersion{ - // Spec: openshiftv1.ClusterVersionSpec{ - // Channel: "stable-4.2", - // }, - // } - - // obj = cv.DeepCopy() - // } - - // return nil - - // } - // _, err := peer.SelectDinDArgs(instance) - // Expect(err).NotTo(HaveOccurred()) - - // Expect(len(instance.Spec.DindArgs)).NotTo(Equal(0)) - // }) - It("returns a breaking error if initialization fails", func() { cfg.PeerInitConfig.CorePeerFile = "../../../../defaultconfig/peer/badfile.yaml" peer.Initializer = peerinit.New(cfg.PeerInitConfig, nil, nil, nil, nil, enroller.HSMEnrollJobTimeouts{})