From 428f746cff72d94e046fa0514973497df05b3153 Mon Sep 17 00:00:00 2001 From: Shoaeb Jindani Date: Sun, 18 Feb 2024 22:26:52 -0800 Subject: [PATCH 1/9] Removing Dind Tests Signed-off-by: Shoaeb Jindani Signed-off-by: Shoaeb Jindani --- .../ibppeer/ibppeer_controller_test.go | 1 - integration/migration/fabric/peer_test.go | 19 ++------------ integration/peer/peer_test.go | 17 ------------ pkg/migrator/peer/fabric/v2/peer_test.go | 7 ----- pkg/migrator/peer/fabric/v25/peer_test.go | 3 --- .../base/console/override/deployercm_test.go | 26 ------------------- .../base/peer/override/deployment_test.go | 20 -------------- pkg/offering/base/peer/peer_test.go | 10 ------- .../images/fabricversion_test.go | 6 ----- .../reconcilechecks/images/images_test.go | 18 ------------- .../k8s/console/override/deployercm_test.go | 4 --- .../console/override/deployercm_test.go | 4 --- pkg/offering/openshift/peer/peer_test.go | 24 ----------------- 13 files changed, 2 insertions(+), 157 deletions(-) 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/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/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/peer_test.go b/pkg/migrator/peer/fabric/v25/peer_test.go index 67a6a839..0d40c248 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", - }, }, }, }, 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/peer/override/deployment_test.go b/pkg/offering/base/peer/override/deployment_test.go index b03e011b..95c98ffa 100644 --- a/pkg/offering/base/peer/override/deployment_test.go +++ b/pkg/offering/base/peer/override/deployment_test.go @@ -173,18 +173,6 @@ var _ = Describe("Base Peer Deployment Overrides", func() { StateDb: "couchdb", ImagePullSecrets: []string{"pullsecret1"}, Resources: ¤t.PeerResources{ - DinD: &corev1.ResourceRequirements{ - Requests: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: testMatrix[0][0], - corev1.ResourceMemory: testMatrix[0][1], - corev1.ResourceEphemeralStorage: testMatrix[0][4], - }, - Limits: map[corev1.ResourceName]resource.Quantity{ - corev1.ResourceCPU: testMatrix[0][2], - corev1.ResourceMemory: testMatrix[0][3], - corev1.ResourceEphemeralStorage: testMatrix[0][5], - }, - }, Peer: &corev1.ResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ corev1.ResourceCPU: testMatrix[1][0], @@ -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,7 +476,6 @@ 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")) @@ -499,7 +485,6 @@ var _ = Describe("Base Peer Deployment Overrides", func() { 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,7 +493,6 @@ 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")) @@ -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,7 +641,6 @@ 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")) @@ -667,7 +649,6 @@ var _ = Describe("Base Peer Deployment Overrides", func() { 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,7 +657,6 @@ 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")) 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/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_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{}) From e9d5a77a5200e1e60cd38ea07c0b34a19adc8e59 Mon Sep 17 00:00:00 2001 From: Shoaeb Jindani Date: Wed, 21 Feb 2024 08:32:04 -0800 Subject: [PATCH 2/9] Fix Unit Tests Signed-off-by: Shoaeb Jindani Signed-off-by: Shoaeb Jindani --- api/v1beta1/common.go | 1 - api/v1beta1/ibppeer.go | 6 -- api/v1beta1/ibppeer_types.go | 17 ---- api/v1beta1/zz_generated.deepcopy.go | 10 -- ...source-operator.clusterserviceversion.yaml | 21 ---- config/crd/bases/ibp.com_ibpconsoles.yaml | 6 -- config/crd/bases/ibp.com_ibppeers.yaml | 39 -------- controllers/ibppeer/predicate.go | 14 +-- definitions/console/deployer-configmap.yaml | 7 -- definitions/peer/deployment.yaml | 39 -------- integration/helper/crspecs.go | 12 --- pkg/apis/deployer/deployer.go | 12 --- pkg/migrator/peer/fabric/v25/peer_test.go | 4 - pkg/offering/base/peer/override/deployment.go | 24 ----- .../base/peer/override/deployment_test.go | 98 +++++++++---------- pkg/offering/base/peer/peer.go | 7 +- pkg/offering/openshift/peer/peer.go | 27 ----- 17 files changed, 52 insertions(+), 292 deletions(-) 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 b36b41d1..a85ba82b 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/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/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 f8529b45..f3f5c80d 100644 --- a/definitions/peer/deployment.yaml +++ b/definitions/peer/deployment.yaml @@ -30,45 +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: - allowPrivilegeEscalation: true - capabilities: - add: - - NET_BIND_SERVICE - drop: - - ALL - privileged: true - readOnlyRootFilesystem: false - runAsNonRoot: false - runAsUser: 0 - env: - name: LICENSE value: accept 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/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/migrator/peer/fabric/v25/peer_test.go b/pkg/migrator/peer/fabric/v25/peer_test.go index 0d40c248..3bc558ff 100644 --- a/pkg/migrator/peer/fabric/v25/peer_test.go +++ b/pkg/migrator/peer/fabric/v25/peer_test.go @@ -144,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/peer/override/deployment.go b/pkg/offering/base/peer/override/deployment.go index 49ce5d6d..8cf4352e 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 95c98ffa..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")}, @@ -174,6 +174,18 @@ var _ = Describe("Base Peer Deployment Overrides", func() { ImagePullSecrets: []string{"pullsecret1"}, Resources: ¤t.PeerResources{ Peer: &corev1.ResourceRequirements{ + Requests: map[corev1.ResourceName]resource.Quantity{ + corev1.ResourceCPU: testMatrix[0][0], + corev1.ResourceMemory: testMatrix[0][1], + corev1.ResourceEphemeralStorage: testMatrix[0][4], + }, + Limits: map[corev1.ResourceName]resource.Quantity{ + corev1.ResourceCPU: testMatrix[0][2], + corev1.ResourceMemory: testMatrix[0][3], + corev1.ResourceEphemeralStorage: testMatrix[0][5], + }, + }, + GRPCProxy: &corev1.ResourceRequirements{ Requests: map[corev1.ResourceName]resource.Quantity{ corev1.ResourceCPU: testMatrix[1][0], corev1.ResourceMemory: testMatrix[1][1], @@ -185,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], @@ -197,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], }, }, }, @@ -255,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() { @@ -263,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() { @@ -283,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() { @@ -291,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() { @@ -299,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() { @@ -307,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() { @@ -315,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() { @@ -323,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() { @@ -364,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,9 +476,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: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")) }) }) @@ -493,9 +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[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")) }) }) @@ -524,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() { @@ -579,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() { @@ -587,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)) }) }) }) @@ -641,9 +641,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: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")) }) }) @@ -657,9 +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[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/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 -} From 244573b85d4f76654d60d5a7005c4007fb8b73b0 Mon Sep 17 00:00:00 2001 From: Shoaeb Jindani Date: Wed, 21 Feb 2024 09:20:10 -0800 Subject: [PATCH 3/9] Removed More Reference of DIND Signed-off-by: Shoaeb Jindani Signed-off-by: Shoaeb Jindani --- bundle/manifests/ibp.com_ibpconsoles.yaml | 6 - bundle/manifests/ibp.com_ibppeers.yaml | 39 --- ...source-operator.clusterserviceversion.yaml | 21 -- controllers/ibpca/mocks/careconcile.go | 7 +- .../ibpconsole/mocks/consolereconcile.go | 7 +- .../ibporderer/mocks/ordererreconcile.go | 7 +- controllers/ibppeer/mocks/peerreconcile.go | 7 +- pkg/action/mocks/deploymentreset.go | 21 +- pkg/action/mocks/enrollinstance.go | 223 ++++++-------- pkg/action/mocks/reenroller.go | 7 +- pkg/action/mocks/reenrollinstance.go | 180 +++++------- pkg/action/mocks/upgradeinstance.go | 195 +++++-------- pkg/certificate/mocks/reenroller.go | 7 +- pkg/certificate/reenroller/mocks/identity.go | 21 +- pkg/command/mocks/reader.go | 14 +- pkg/controller/mocks/client.go | 63 ++-- pkg/crd/mocks/client.go | 7 +- pkg/initializer/ca/mocks/client.go | 63 ++-- pkg/initializer/ca/mocks/config.go | 65 ++--- pkg/initializer/ca/mocks/ibpca.go | 83 +++--- pkg/initializer/common/config/mocks/crypto.go | 21 +- .../common/enroller/mocks/caclient.go | 42 ++- .../common/enroller/mocks/client.go | 63 ++-- .../common/enroller/mocks/cryptoenroller.go | 21 +- .../common/enroller/mocks/cryptoinstance.go | 223 ++++++-------- .../common/enroller/mocks/hsmcaclient.go | 31 +- .../common/enroller/mocks/instance.go | 188 +++++------- .../common/mocks/cryptovalidator.go | 24 +- pkg/initializer/cryptogen/mocks/config.go | 13 +- pkg/initializer/cryptogen/mocks/instance.go | 195 +++++-------- pkg/initializer/orderer/mocks/ibporderer.go | 21 +- pkg/initializer/peer/mocks/client.go | 63 ++-- pkg/initializer/peer/mocks/ibppeer.go | 28 +- pkg/manager/resources/job/mocks/client.go | 63 ++-- .../resources/mocks/resource_manager.go | 52 ++-- pkg/migrator/peer/fabric/mocks/migrator.go | 28 +- .../peer/fabric/v2/mocks/configmapmanager.go | 14 +- .../peer/fabric/v2/mocks/deploymentmanager.go | 28 +- .../peer/fabric/v25/mocks/configmapmanager.go | 14 +- .../fabric/v25/mocks/deploymentmanager.go | 28 +- .../base/ca/mocks/certificate_manager.go | 28 +- pkg/offering/base/ca/mocks/initialize.go | 42 ++- pkg/offering/base/ca/mocks/initializer.go | 14 +- pkg/offering/base/ca/mocks/restart_manager.go | 28 +- pkg/offering/base/ca/mocks/update.go | 77 +++-- .../base/console/mocks/restart_manager.go | 21 +- pkg/offering/base/console/mocks/update.go | 35 +-- .../base/orderer/mocks/certificate_manager.go | 28 +- .../base/orderer/mocks/deployment_manager.go | 59 ++-- .../orderer/mocks/initializeibporderer.go | 119 ++++---- .../base/orderer/mocks/node_manager.go | 7 +- .../base/orderer/mocks/restart_manager.go | 42 ++- pkg/offering/base/orderer/mocks/update.go | 168 +++++------ .../base/peer/mocks/certificate_manager.go | 28 +- .../base/peer/mocks/deployment_manager.go | 73 ++--- pkg/offering/base/peer/mocks/initializer.go | 91 +++--- .../base/peer/mocks/restart_manager.go | 42 ++- pkg/offering/base/peer/mocks/update.go | 272 +++++------------- .../images/mocks/fabricversion.go | 7 +- .../reconcilechecks/images/mocks/instance.go | 31 +- .../reconcilechecks/images/mocks/update.go | 14 +- .../common/reconcilechecks/mocks/image.go | 14 +- .../common/reconcilechecks/mocks/instance.go | 31 +- .../common/reconcilechecks/mocks/update.go | 14 +- .../common/reconcilechecks/mocks/version.go | 14 +- 65 files changed, 1396 insertions(+), 2106 deletions(-) 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/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml b/config/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml index 5c58efbf..a53f647d 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/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/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/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/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/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/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/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 } From 70881e29e48c012146590d4ed137752516303792 Mon Sep 17 00:00:00 2001 From: Ratnakar Date: Tue, 20 Feb 2024 14:02:39 -0500 Subject: [PATCH 4/9] Updating fabric-ca dependencies (#173) Signed-off-by: asararatnakar Signed-off-by: Shoaeb Jindani --- go.mod | 61 +++---- go.sum | 151 +++++++++--------- pkg/certificate/reenroller/client_pkcs11.go | 4 +- pkg/certificate/reenroller/reenroller.go | 2 +- pkg/initializer/ca/bccsp/config.go | 2 +- pkg/initializer/ca/bccsp/configpkcs11.go | 4 +- pkg/initializer/ca/tls/tls.go | 2 +- pkg/initializer/ca/tls/tls_test.go | 2 +- .../common/enroller/client_pkcs11.go | 4 +- pkg/offering/base/orderer/orderer.go | 2 +- 10 files changed, 118 insertions(+), 116 deletions(-) diff --git a/go.mod b/go.mod index 24ffb42b..1ed28f15 100644 --- a/go.mod +++ b/go.mod @@ -5,23 +5,24 @@ go 1.20 require ( github.com/cloudflare/cfssl v1.4.1 github.com/docker/docker v24.0.7+incompatible - github.com/go-logr/logr v0.4.0 + github.com/go-logr/logr v1.4.1 github.com/go-test/deep v1.0.2 github.com/gogo/protobuf v1.3.2 github.com/hyperledger/fabric v0.0.0-20240123171006-370ebe56cea8 - github.com/hyperledger/fabric-ca v1.5.9-0.20240123181634-abc987b6d0c4 + github.com/hyperledger/fabric-ca v1.5.9 + github.com/hyperledger/fabric-lib-go v1.1.0 github.com/hyperledger/fabric-protos-go v0.3.3 github.com/imdario/mergo v0.3.12 github.com/lib/pq v1.8.0 github.com/maxbrunsfeld/counterfeiter/v6 v6.2.3 - github.com/onsi/ginkgo/v2 v2.1.4 - github.com/onsi/gomega v1.19.0 + github.com/onsi/ginkgo/v2 v2.13.2 + github.com/onsi/gomega v1.31.0 github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible github.com/operator-framework/operator-lib v0.8.0 github.com/pkg/errors v0.9.1 github.com/spf13/viper v1.7.0 github.com/vrischmann/envconfig v1.3.0 - go.uber.org/zap v1.19.0 + go.uber.org/zap v1.26.0 gopkg.in/yaml.v2 v2.4.0 k8s.io/api v0.21.5 k8s.io/apiextensions-apiserver v0.21.5 @@ -42,7 +43,7 @@ require ( ) require ( - cloud.google.com/go/compute v1.19.1 // indirect + cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect github.com/PuerkitoBio/purell v1.1.1 // indirect @@ -57,7 +58,7 @@ require ( github.com/emicklei/go-restful v2.16.0+incompatible // indirect github.com/evanphx/json-patch v4.11.0+incompatible // indirect github.com/felixge/httpsnoop v1.0.1 // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-kit/kit v0.10.0 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/zapr v0.4.0 // indirect @@ -67,12 +68,12 @@ require ( github.com/go-openapi/swag v0.19.5 // indirect github.com/go-sql-driver/mysql v1.5.0 // indirect github.com/go-stack/stack v1.8.1 // indirect - github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/certificate-transparency-go v1.0.21 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.4.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect @@ -80,18 +81,17 @@ require ( github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2 // indirect - github.com/hyperledger/fabric-lib-go v1.0.0 // indirect github.com/jmhodges/clock v0.0.0-20160418191101-880ee4c33548 // indirect github.com/jmoiron/sqlx v1.3.4 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kilic/bls12-381 v0.1.0 // indirect github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46 // indirect - github.com/magiconair/properties v1.8.1 // indirect + github.com/magiconair/properties v1.8.7 // indirect github.com/mailru/easyjson v0.7.0 // indirect github.com/mattn/go-sqlite3 v1.14.18 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/miekg/pkcs11 v1.1.1 // indirect - github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect @@ -101,35 +101,34 @@ require ( github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/prometheus/procfs v0.10.1 // indirect - github.com/spf13/afero v1.3.1 // indirect - github.com/spf13/cast v1.3.1 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.8.2 // indirect - github.com/subosito/gotenv v1.2.0 // indirect + github.com/stretchr/testify v1.8.4 // indirect + github.com/subosito/gotenv v1.6.0 // indirect github.com/sykesm/zap-logfmt v0.0.4 // indirect github.com/weppos/publicsuffix-go v0.5.0 // indirect github.com/zmap/zcrypto v0.0.0-20190729165852-9051775e6a2e // indirect github.com/zmap/zlint v0.0.0-20190806154020-fd021b4cfbeb // indirect - go.uber.org/atomic v1.7.0 // indirect - go.uber.org/multierr v1.6.0 // indirect + go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.18.0 // indirect - golang.org/x/mod v0.10.0 // indirect + golang.org/x/mod v0.14.0 // indirect golang.org/x/net v0.20.0 // indirect - golang.org/x/oauth2 v0.7.0 // indirect - golang.org/x/sys v0.16.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect + golang.org/x/sys v0.17.0 // indirect golang.org/x/term v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect - golang.org/x/tools v0.8.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.17.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect - google.golang.org/grpc v1.56.3 // indirect + google.golang.org/appengine v1.6.8 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect + google.golang.org/grpc v1.61.0 // indirect google.golang.org/protobuf v1.32.0 // indirect gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.51.0 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/ldap.v2 v2.5.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/component-base v0.21.5 // indirect @@ -139,3 +138,9 @@ require ( rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect ) + +replace ( + github.com/go-logr/logr => github.com/go-logr/logr v0.4.0 + github.com/onsi/ginkgo/v2 => github.com/onsi/ginkgo/v2 v2.1.4 + github.com/onsi/gomega => github.com/onsi/gomega v1.19.0 +) diff --git a/go.sum b/go.sum index 38602d4f..83d99a71 100644 --- a/go.sum +++ b/go.sum @@ -13,8 +13,8 @@ cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bP cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= -cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= +cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= +cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= @@ -75,8 +75,6 @@ github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:l github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -165,9 +163,11 @@ github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/getsentry/raven-go v0.0.0-20180121060056-563b81fc02b7/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-bindata/go-bindata/v3 v3.1.3/go.mod h1:1/zrpXsLD8YDIbhZRqXzm1Ghc7NhEvIN9+Z6R5/xH4I= @@ -184,8 +184,6 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0 h1:K7/B1jt6fIBQVd4Owv2MqGQClcgf0R266+7C/QjRcLc= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/zapr v0.4.0 h1:uc1uML3hRYL9/ZZPdgHS/n8Nzo+eaYL/Efxkkamf7OM= @@ -227,8 +225,9 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -266,8 +265,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -277,19 +276,19 @@ github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OI github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -335,20 +334,20 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/hyperledger/fabric v0.0.0-20240123171006-370ebe56cea8 h1:Dnb+AM2QOh0booZvj+dX7YQgvvT2LD30pjAFOBQiORk= github.com/hyperledger/fabric v0.0.0-20240123171006-370ebe56cea8/go.mod h1:CWuR15Igz7KnQ9gP+mk5e8O4CBuEzd4BJyuwO0RrPio= github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2 h1:B1Nt8hKb//KvgGRprk0h1t4lCnwhE9/ryb1WqfZbV+M= github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2/go.mod h1:X+DIyUsaTmalOpmpQfIvFZjKHQedrURQ5t4YqquX7lE= -github.com/hyperledger/fabric-ca v1.5.9-0.20240123181634-abc987b6d0c4 h1:x9MvR7WrORbD8/d7TznwIS9xer8uTJKESpS/7d/PE5g= -github.com/hyperledger/fabric-ca v1.5.9-0.20240123181634-abc987b6d0c4/go.mod h1:pYf1iFNbyRp4U1XVL1Hn0ZcBuEpO4zgxpPpzt8w0pA0= +github.com/hyperledger/fabric-ca v1.5.9 h1:xQleY3CPjGQiaT8PSVw/NsxZ7B06vTnr28whvFu36E4= +github.com/hyperledger/fabric-ca v1.5.9/go.mod h1:qq4vMj7FFMTEzNkirmzJ6PN12ILX5F/9a8xO3r1h6/A= github.com/hyperledger/fabric-config v0.2.1 h1:CsReuxvi5c5NUyKKQOIVbHux32o+XtmDNceYLYjycxo= -github.com/hyperledger/fabric-lib-go v1.0.0 h1:UL1w7c9LvHZUSkIvHTDGklxFv2kTeva1QI2emOVc324= -github.com/hyperledger/fabric-lib-go v1.0.0/go.mod h1:H362nMlunurmHwkYqR5uHL2UDWbQdbfz74n8kbCFsqc= +github.com/hyperledger/fabric-lib-go v1.1.0 h1:iVjRr0oxqNn2P0SH2UCiOdLak56kqn/YJ6A/wnxNNaU= +github.com/hyperledger/fabric-lib-go v1.1.0/go.mod h1:SHNCq8AB0VpHAmvJEtdbzabv6NNV1F48JdmDihasBjc= github.com/hyperledger/fabric-protos-go v0.3.3 h1:0nssqz8QWJNVNBVQz+IIfAd2j1ku7QPKFSM/1anKizI= github.com/hyperledger/fabric-protos-go v0.3.3/go.mod h1:BPXse9gIOQwyAePQrwQVUcc44bTW4bB5V3tujuvyArk= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= @@ -376,7 +375,6 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= @@ -392,7 +390,6 @@ github.com/kisielk/sqlstruct v0.0.0-20201105191214-5f3e10d3ab46/go.mod h1:yyMNCy github.com/kisom/goutils v1.1.0/go.mod h1:+UBTfd78habUYWFbNWTJNG+jNG/i/lGURakr4A/yNRw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= @@ -414,8 +411,9 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-b github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0 h1:aizVhC/NAAcKWb+5QsU1iNOZb4Yws5UO2I+aIprQITM= @@ -453,8 +451,8 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= @@ -482,7 +480,6 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -490,23 +487,13 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= @@ -539,7 +526,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -599,20 +585,18 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.3.1 h1:GPTpEAuNr98px18yNQ66JllNil98wfRZ/5Ukny8FeQA= -github.com/spf13/afero v1.3.1/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= @@ -635,21 +619,18 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/sykesm/zap-logfmt v0.0.4 h1:U2WzRvmIWG1wDLCFY3sz8UeEmsdHQjHFNlIdmroVFaI= github.com/sykesm/zap-logfmt v0.0.4/go.mod h1:AuBd9xQjAe3URrWT1BBDk2v2onAZHkZkWRMiYZXiZWA= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -669,6 +650,8 @@ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1: github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= github.com/zmap/rc2 v0.0.0-20131011165748-24b9757f5521/go.mod h1:3YZ9o3WnatTIZhuOtot4IcUfzoKVjUHqu6WALIyI0nE= github.com/zmap/zcertificate v0.0.0-20180516150559-0e3d58b1bac4/go.mod h1:5iU54tB79AMBcySS0R2XIyZBAVmeHranShAFELYx7is= @@ -690,21 +673,21 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= +go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.12.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -712,11 +695,11 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -751,11 +734,12 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.1-0.20200828183125-ce943fd02449/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk= -golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -782,12 +766,14 @@ golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -795,8 +781,8 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g= -golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -806,11 +792,11 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -828,13 +814,11 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -862,11 +846,18 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -876,14 +867,17 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba h1:O8mE0/t419eoIwhTFpKVkHiTs/Igowgfkj25AcZrtiE= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -932,8 +926,10 @@ golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.8.0 h1:vSDcovVPld282ceKgDimkRSC8kpaH1dgyc9UMzlt84Y= -golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -957,8 +953,9 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -981,8 +978,8 @@ google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A= -google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -995,8 +992,8 @@ google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.56.3 h1:8I4C0Yq1EjstUzUJzpcRVbuYA2mODtEmpWiQoN/b2nc= -google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1021,14 +1018,14 @@ gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ldap.v2 v2.5.1 h1:wiu0okdNfjlBzg6UWvd1Hn8Y+Ux17/u/4nlk4CQr6tU= gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= diff --git a/pkg/certificate/reenroller/client_pkcs11.go b/pkg/certificate/reenroller/client_pkcs11.go index cefa0e45..ef96a2e2 100644 --- a/pkg/certificate/reenroller/client_pkcs11.go +++ b/pkg/certificate/reenroller/client_pkcs11.go @@ -24,8 +24,8 @@ package reenroller import ( commonapi "github.com/IBM-Blockchain/fabric-operator/pkg/apis/common" "github.com/hyperledger/fabric-ca/lib" - "github.com/hyperledger/fabric/bccsp/factory" - "github.com/hyperledger/fabric/bccsp/pkcs11" + "github.com/hyperledger/fabric-lib-go/bccsp/factory" + "github.com/hyperledger/fabric-lib-go/bccsp/pkcs11" ) func GetClient(client *lib.Client, bccsp *commonapi.BCCSP) *lib.Client { diff --git a/pkg/certificate/reenroller/reenroller.go b/pkg/certificate/reenroller/reenroller.go index 4f4a8f78..80309b6f 100644 --- a/pkg/certificate/reenroller/reenroller.go +++ b/pkg/certificate/reenroller/reenroller.go @@ -39,7 +39,7 @@ import ( fabricx509 "github.com/hyperledger/fabric-ca/lib/client/credential/x509" "github.com/hyperledger/fabric-ca/lib/tls" utils "github.com/hyperledger/fabric-ca/util" - "github.com/hyperledger/fabric/bccsp" + "github.com/hyperledger/fabric-lib-go/bccsp" "github.com/pkg/errors" "k8s.io/apimachinery/pkg/util/wait" diff --git a/pkg/initializer/ca/bccsp/config.go b/pkg/initializer/ca/bccsp/config.go index 673b31f2..4fac616d 100644 --- a/pkg/initializer/ca/bccsp/config.go +++ b/pkg/initializer/ca/bccsp/config.go @@ -23,7 +23,7 @@ package bccsp import ( v1 "github.com/IBM-Blockchain/fabric-operator/pkg/apis/ca/v1" - "github.com/hyperledger/fabric/bccsp/factory" + "github.com/hyperledger/fabric-lib-go/bccsp/factory" ) func GetBCCSPOpts(from v1.BCCSP) *factory.FactoryOpts { diff --git a/pkg/initializer/ca/bccsp/configpkcs11.go b/pkg/initializer/ca/bccsp/configpkcs11.go index b8ef8b6a..82aa12db 100644 --- a/pkg/initializer/ca/bccsp/configpkcs11.go +++ b/pkg/initializer/ca/bccsp/configpkcs11.go @@ -23,8 +23,8 @@ package bccsp import ( "github.com/IBM-Blockchain/fabric-operator/pkg/initializer/ca/config" - "github.com/hyperledger/fabric/bccsp/factory" - "github.com/hyperledger/fabric/bccsp/pkcs11" + "github.com/hyperledger/fabric-lib-go/bccsp/factory" + "github.com/hyperledger/fabric-lib-go/bccsp/pkcs11" ) func GetBCCSPOpts(from config.BCCSP) *factory.FactoryOpts { diff --git a/pkg/initializer/ca/tls/tls.go b/pkg/initializer/ca/tls/tls.go index 360af4a5..105de14a 100644 --- a/pkg/initializer/ca/tls/tls.go +++ b/pkg/initializer/ca/tls/tls.go @@ -34,7 +34,7 @@ import ( "github.com/cloudflare/cfssl/csr" "github.com/hyperledger/fabric-ca/api" cautil "github.com/hyperledger/fabric-ca/util" - "github.com/hyperledger/fabric/bccsp/factory" + "github.com/hyperledger/fabric-lib-go/bccsp/factory" ) type TLS struct { diff --git a/pkg/initializer/ca/tls/tls_test.go b/pkg/initializer/ca/tls/tls_test.go index 77433b8c..e095d75f 100644 --- a/pkg/initializer/ca/tls/tls_test.go +++ b/pkg/initializer/ca/tls/tls_test.go @@ -28,7 +28,7 @@ import ( "github.com/IBM-Blockchain/fabric-operator/pkg/initializer/ca/tls" cfcsr "github.com/cloudflare/cfssl/csr" "github.com/hyperledger/fabric-ca/api" - "github.com/hyperledger/fabric/bccsp/factory" + "github.com/hyperledger/fabric-lib-go/bccsp/factory" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) diff --git a/pkg/initializer/common/enroller/client_pkcs11.go b/pkg/initializer/common/enroller/client_pkcs11.go index a5b55fde..6a4ed7b3 100644 --- a/pkg/initializer/common/enroller/client_pkcs11.go +++ b/pkg/initializer/common/enroller/client_pkcs11.go @@ -24,8 +24,8 @@ package enroller import ( commonapi "github.com/IBM-Blockchain/fabric-operator/pkg/apis/common" "github.com/hyperledger/fabric-ca/lib" - "github.com/hyperledger/fabric/bccsp/factory" - "github.com/hyperledger/fabric/bccsp/pkcs11" + "github.com/hyperledger/fabric-lib-go/bccsp/factory" + "github.com/hyperledger/fabric-lib-go/bccsp/pkcs11" ) func GetClient(client *lib.Client, bccsp *commonapi.BCCSP) *lib.Client { diff --git a/pkg/offering/base/orderer/orderer.go b/pkg/offering/base/orderer/orderer.go index fae32ae3..eac972c8 100644 --- a/pkg/offering/base/orderer/orderer.go +++ b/pkg/offering/base/orderer/orderer.go @@ -41,9 +41,9 @@ import ( "github.com/IBM-Blockchain/fabric-operator/pkg/util" "github.com/IBM-Blockchain/fabric-operator/version" "github.com/gogo/protobuf/proto" + "github.com/hyperledger/fabric-lib-go/bccsp" "github.com/hyperledger/fabric-protos-go/msp" "github.com/hyperledger/fabric-protos-go/orderer/etcdraft" - "github.com/hyperledger/fabric/bccsp" fmsp "github.com/hyperledger/fabric/msp" "github.com/pkg/errors" "gopkg.in/yaml.v2" From 2eac7bb15257082fdacb51f8c4aaa63eb8157c92 Mon Sep 17 00:00:00 2001 From: s7santosh <32326887+s7santosh@users.noreply.github.com> Date: Fri, 8 Mar 2024 00:00:20 +0530 Subject: [PATCH 5/9] console role definition replicasets resources typo correction (#178) Signed-off-by: Shoaeb Jindani --- definitions/console/role.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions/console/role.yaml b/definitions/console/role.yaml index 18d307b4..c819845d 100644 --- a/definitions/console/role.yaml +++ b/definitions/console/role.yaml @@ -62,7 +62,7 @@ rules: - pods/log - persistentvolumeclaims - deployments - - replicas + - replicasets - ingresses verbs: - "get" From b1172fe3dbd6c548971b91cad98736cd7c11a1a3 Mon Sep 17 00:00:00 2001 From: Shoaeb Jindani Date: Thu, 21 Mar 2024 11:37:19 +0530 Subject: [PATCH 6/9] Fixed deployment.yaml merge conflict Signed-off-by: Shoaeb Jindani --- definitions/peer/deployment.yaml | 50 +++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/definitions/peer/deployment.yaml b/definitions/peer/deployment.yaml index f3f5c80d..8ea7033f 100644 --- a/definitions/peer/deployment.yaml +++ b/definitions/peer/deployment.yaml @@ -30,6 +30,47 @@ 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 @@ -97,6 +138,8 @@ spec: cpu: 200m memory: 400M securityContext: + seccompProfile: + type: RuntimeDefault allowPrivilegeEscalation: false capabilities: add: @@ -105,6 +148,7 @@ spec: - ALL privileged: false readOnlyRootFilesystem: false + runAsGroup: 7051 runAsNonRoot: true runAsUser: 7051 volumeMounts: @@ -178,6 +222,8 @@ spec: cpu: 100m memory: 200M securityContext: + seccompProfile: + type: RuntimeDefault allowPrivilegeEscalation: false capabilities: add: @@ -186,6 +232,7 @@ spec: - ALL privileged: false readOnlyRootFilesystem: false + runAsGroup: 1000 runAsNonRoot: true runAsUser: 1000 volumeMounts: @@ -230,5 +277,6 @@ spec: subPath: data securityContext: fsGroup: 2000 + runAsGroup: 1000 runAsNonRoot: true - runAsUser: 1000 + runAsUser: 1000 \ No newline at end of file From 7a13cbaf8128d8bee0a7e6d1dfd8573ebaf92408 Mon Sep 17 00:00:00 2001 From: Ratnakar Date: Mon, 11 Mar 2024 10:51:52 -0400 Subject: [PATCH 7/9] Fix Insecure File Permissions (#175) Changes to disable read and write permissions to the group user Signed-off-by: asararatnakar Signed-off-by: Shoaeb Jindani --- definitions/ca/deployment.yaml | 2 ++ definitions/console/deployment.yaml | 3 +++ definitions/orderer/deployment.yaml | 3 +++ definitions/peer/chaincode-launcher.yaml | 1 + definitions/peer/couchdb.yaml | 1 + 5 files changed, 10 insertions(+) diff --git a/definitions/ca/deployment.yaml b/definitions/ca/deployment.yaml index b155d175..7522edf4 100644 --- a/definitions/ca/deployment.yaml +++ b/definitions/ca/deployment.yaml @@ -82,6 +82,7 @@ spec: - ALL privileged: false readOnlyRootFilesystem: false + runAsGroup: 7051 runAsNonRoot: true runAsUser: 7051 volumeMounts: @@ -130,6 +131,7 @@ spec: runAsUser: 0 securityContext: fsGroup: 7051 + runAsGroup: 7051 runAsNonRoot: true runAsUser: 7051 serviceAccountName: sample diff --git a/definitions/console/deployment.yaml b/definitions/console/deployment.yaml index 7bfdada6..c62800ef 100644 --- a/definitions/console/deployment.yaml +++ b/definitions/console/deployment.yaml @@ -70,6 +70,7 @@ spec: - ALL privileged: false readOnlyRootFilesystem: false + runAsGroup: 1000 runAsNonRoot: true runAsUser: 1000 volumeMounts: @@ -117,6 +118,7 @@ spec: - ALL privileged: false readOnlyRootFilesystem: false + runAsGroup: 1000 runAsNonRoot: true runAsUser: 1000 volumeMounts: @@ -199,6 +201,7 @@ spec: runAsUser: 0 securityContext: fsGroup: 2000 + runAsGroup: 1000 runAsNonRoot: true runAsUser: 1000 serviceAccountName: sample diff --git a/definitions/orderer/deployment.yaml b/definitions/orderer/deployment.yaml index 8b37dd47..a5cc1bde 100644 --- a/definitions/orderer/deployment.yaml +++ b/definitions/orderer/deployment.yaml @@ -80,6 +80,7 @@ spec: - ALL privileged: false readOnlyRootFilesystem: false + runAsGroup: 7051 runAsNonRoot: true runAsUser: 7051 startupProbe: @@ -171,6 +172,7 @@ spec: - ALL privileged: false readOnlyRootFilesystem: false + runAsGroup: 1000 runAsNonRoot: true runAsUser: 1000 volumeMounts: @@ -221,6 +223,7 @@ spec: subPath: data securityContext: fsGroup: 2000 + runAsGroup: 1000 runAsNonRoot: true runAsUser: 1000 serviceAccountName: sample diff --git a/definitions/peer/chaincode-launcher.yaml b/definitions/peer/chaincode-launcher.yaml index 1b3830b1..ac880f4c 100644 --- a/definitions/peer/chaincode-launcher.yaml +++ b/definitions/peer/chaincode-launcher.yaml @@ -20,6 +20,7 @@ imagePullPolicy: Always securityContext: privileged: false readOnlyRootFileSystem: false + runAsGroup: 7051 runAsNonRoot: true runAsUser: 7051 capabilities: diff --git a/definitions/peer/couchdb.yaml b/definitions/peer/couchdb.yaml index d0ad8486..8e40dd58 100644 --- a/definitions/peer/couchdb.yaml +++ b/definitions/peer/couchdb.yaml @@ -21,6 +21,7 @@ imagePullPolicy: Always securityContext: privileged: false readOnlyRootFileSystem: false + runAsGroup: 5984 runAsNonRoot: true runAsUser: 5984 capabilities: From 8cd76d1339c81c7924ae1bcdbf23fdafcd3caa43 Mon Sep 17 00:00:00 2001 From: Ratnakar Date: Mon, 11 Mar 2024 10:52:27 -0400 Subject: [PATCH 8/9] Disable unshare in the pod containers (#179) Signed-off-by: asararatnakar Signed-off-by: Shoaeb Jindani --- ...bric-opensource-operator.clusterserviceversion.yaml | 2 ++ config/manager/manager.yaml | 2 ++ ...bric-opensource-operator.clusterserviceversion.yaml | 2 ++ definitions/ca/deployment.yaml | 2 ++ definitions/console/deployment.yaml | 6 ++++++ definitions/orderer/deployment.yaml | 4 ++++ definitions/peer/chaincode-launcher.yaml | 2 ++ definitions/peer/couchdb.yaml | 2 ++ pkg/offering/base/ca/override/deployment.go | 4 ++++ pkg/offering/base/console/override/deployment.go | 5 +++++ pkg/offering/base/orderer/override/deployment.go | 4 ++++ pkg/offering/base/peer/override/deployment.go | 5 +++++ pkg/offering/common/override.go | 10 ++++++++++ 13 files changed, 50 insertions(+) diff --git a/bundle/manifests/fabric-opensource-operator.clusterserviceversion.yaml b/bundle/manifests/fabric-opensource-operator.clusterserviceversion.yaml index a85ba82b..67cc6122 100644 --- a/bundle/manifests/fabric-opensource-operator.clusterserviceversion.yaml +++ b/bundle/manifests/fabric-opensource-operator.clusterserviceversion.yaml @@ -1816,6 +1816,8 @@ spec: ephemeral-storage: 100Mi memory: 200Mi securityContext: + seccompProfile: + type: RuntimeDefault allowPrivilegeEscalation: false capabilities: add: diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 61c2b02d..ae2180eb 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -98,6 +98,8 @@ spec: memory: 200Mi ephemeral-storage: 100Mi securityContext: + seccompProfile: + type: RuntimeDefault allowPrivilegeEscalation: false capabilities: add: diff --git a/config/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml b/config/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml index a53f647d..966f2946 100644 --- a/config/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/fabric-opensource-operator.clusterserviceversion.yaml @@ -1813,6 +1813,8 @@ spec: ephemeral-storage: 100Mi memory: 200Mi securityContext: + seccompProfile: + type: RuntimeDefault allowPrivilegeEscalation: false capabilities: add: diff --git a/definitions/ca/deployment.yaml b/definitions/ca/deployment.yaml index 7522edf4..5bf00f9a 100644 --- a/definitions/ca/deployment.yaml +++ b/definitions/ca/deployment.yaml @@ -74,6 +74,8 @@ spec: ephemeral-storage: 100M memory: 100Mi securityContext: + seccompProfile: + type: RuntimeDefault allowPrivilegeEscalation: false capabilities: add: diff --git a/definitions/console/deployment.yaml b/definitions/console/deployment.yaml index c62800ef..98514e7d 100644 --- a/definitions/console/deployment.yaml +++ b/definitions/console/deployment.yaml @@ -62,6 +62,8 @@ spec: ephemeral-storage: 100M memory: 1000Mi securityContext: + seccompProfile: + type: RuntimeDefault allowPrivilegeEscalation: false capabilities: add: @@ -110,6 +112,8 @@ spec: ephemeral-storage: 100M memory: 200Mi securityContext: + seccompProfile: + type: RuntimeDefault allowPrivilegeEscalation: false capabilities: add: @@ -160,6 +164,8 @@ spec: ephemeral-storage: 100M memory: 50Mi securityContext: + seccompProfile: + type: RuntimeDefault allowPrivilegeEscalation: false capabilities: add: diff --git a/definitions/orderer/deployment.yaml b/definitions/orderer/deployment.yaml index a5cc1bde..38b30c58 100644 --- a/definitions/orderer/deployment.yaml +++ b/definitions/orderer/deployment.yaml @@ -72,6 +72,8 @@ spec: ephemeral-storage: 100M memory: 100Mi securityContext: + seccompProfile: + type: RuntimeDefault allowPrivilegeEscalation: false capabilities: add: @@ -165,6 +167,8 @@ spec: ephemeral-storage: 100M memory: 100Mi securityContext: + seccompProfile: + type: RuntimeDefault capabilities: add: - NET_BIND_SERVICE diff --git a/definitions/peer/chaincode-launcher.yaml b/definitions/peer/chaincode-launcher.yaml index ac880f4c..fc60fa3e 100644 --- a/definitions/peer/chaincode-launcher.yaml +++ b/definitions/peer/chaincode-launcher.yaml @@ -18,6 +18,8 @@ name: "chaincode-launcher" imagePullPolicy: Always securityContext: + seccompProfile: + type: RuntimeDefault privileged: false readOnlyRootFileSystem: false runAsGroup: 7051 diff --git a/definitions/peer/couchdb.yaml b/definitions/peer/couchdb.yaml index 8e40dd58..eff94a7f 100644 --- a/definitions/peer/couchdb.yaml +++ b/definitions/peer/couchdb.yaml @@ -19,6 +19,8 @@ name: "couchdb" image: "" imagePullPolicy: Always securityContext: + seccompProfile: + type: RuntimeDefault privileged: false readOnlyRootFileSystem: false runAsGroup: 5984 diff --git a/pkg/offering/base/ca/override/deployment.go b/pkg/offering/base/ca/override/deployment.go index 4e9077da..6773852b 100644 --- a/pkg/offering/base/ca/override/deployment.go +++ b/pkg/offering/base/ca/override/deployment.go @@ -33,6 +33,7 @@ import ( "github.com/IBM-Blockchain/fabric-operator/pkg/manager/resources/deployment" dep "github.com/IBM-Blockchain/fabric-operator/pkg/manager/resources/deployment" "github.com/IBM-Blockchain/fabric-operator/pkg/manager/resources/serviceaccount" + "github.com/IBM-Blockchain/fabric-operator/pkg/offering/common" "github.com/IBM-Blockchain/fabric-operator/pkg/util" appsv1 "k8s.io/api/apps/v1" @@ -182,6 +183,9 @@ func (o *Override) CommonDeployment(instance *current.IBPCA, deployment *dep.Dep deployment.SetReplicas(instance.Spec.Replicas) } + // set seccompProfile to RuntimeDefault + common.GetPodSecurityContext(caCont) + return nil } diff --git a/pkg/offering/base/console/override/deployment.go b/pkg/offering/base/console/override/deployment.go index b65add0b..252089bb 100644 --- a/pkg/offering/base/console/override/deployment.go +++ b/pkg/offering/base/console/override/deployment.go @@ -319,6 +319,11 @@ func (o *Override) CommonDeployment(instance *current.IBPConsole, deployment *de } init.SetCommand([]string{"sh", "-c", initCommand}) + // set seccompProfile to RuntimeDefault + common.GetPodSecurityContext(console) + common.GetPodSecurityContext(deployer) + common.GetPodSecurityContext(configtxlator) + return nil } diff --git a/pkg/offering/base/orderer/override/deployment.go b/pkg/offering/base/orderer/override/deployment.go index 35a97a1b..45c60c0c 100644 --- a/pkg/offering/base/orderer/override/deployment.go +++ b/pkg/offering/base/orderer/override/deployment.go @@ -317,6 +317,10 @@ func (o *Override) CommonDeploymentOverrides(instance *current.IBPOrderer, deplo deployment.UpdateContainer(grpcProxy) deployment.UpdateInitContainer(initCont) + // set seccompProfile to RuntimeDefault + common.GetPodSecurityContext(orderer) + common.GetPodSecurityContext(grpcProxy) + return nil } diff --git a/pkg/offering/base/peer/override/deployment.go b/pkg/offering/base/peer/override/deployment.go index 8cf4352e..accf4759 100644 --- a/pkg/offering/base/peer/override/deployment.go +++ b/pkg/offering/base/peer/override/deployment.go @@ -732,6 +732,11 @@ func (o *Override) CommonDeploymentOverrides(instance *current.IBPPeer, deployme deployment.UpdateContainer(peerContainer) deployment.UpdateContainer(grpcContainer) + + // set seccompProfile to RuntimeDefault + common.GetPodSecurityContext(peerContainer) + common.GetPodSecurityContext(grpcContainer) + return nil } diff --git a/pkg/offering/common/override.go b/pkg/offering/common/override.go index 29a4e941..d6ee83f9 100644 --- a/pkg/offering/common/override.go +++ b/pkg/offering/common/override.go @@ -19,6 +19,7 @@ package common import ( + container "github.com/IBM-Blockchain/fabric-operator/pkg/manager/resources/container" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -106,3 +107,12 @@ func GetPodAntiAffinity(orgName string) *corev1.PodAntiAffinity { }, } } + +func GetPodSecurityContext(con container.Container) { + secContext := con.SecurityContext + if secContext.SeccompProfile == nil { + secContext.SeccompProfile = &corev1.SeccompProfile{ + Type: corev1.SeccompProfileTypeRuntimeDefault, + } + } +} From a1786d55c8538813aa31794621e1ab0e4ac9d979 Mon Sep 17 00:00:00 2001 From: Shoaeb Jindani Date: Thu, 21 Mar 2024 11:50:59 +0530 Subject: [PATCH 9/9] Removed dind from peer deployments Signed-off-by: Shoaeb Jindani --- definitions/peer/deployment.yaml | 41 -------------------------------- 1 file changed, 41 deletions(-) diff --git a/definitions/peer/deployment.yaml b/definitions/peer/deployment.yaml index 8ea7033f..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