Skip to content

Commit

Permalink
Update golangci-lint to v1.56.2 (#1626)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amulyam24 committed Feb 22, 2024
1 parent b8162a3 commit 0f5bb7e
Show file tree
Hide file tree
Showing 29 changed files with 209 additions and 214 deletions.
2 changes: 1 addition & 1 deletion api/v1beta2/ibmpowervsclustertemplate_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestIBMPowerVSClusterTemplate_ValidateUpdate(t *testing.T) {
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
t.Run(test.name, func(_ *testing.T) {
_, err := test.newTemplate.ValidateUpdate(test.oldTemplate)
if test.wantErr {
g.Expect(err).To(HaveOccurred())
Expand Down
2 changes: 1 addition & 1 deletion cloud/scope/cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func TestNewClusterScope(t *testing.T) {
}
for _, tc := range testCases {
g := NewWithT(t)
t.Run(tc.name, func(t *testing.T) {
t.Run(tc.name, func(_ *testing.T) {
_, err := NewClusterScope(tc.params)
// Note: only error/failure cases covered
// TO-DO: cover success cases
Expand Down
2 changes: 1 addition & 1 deletion cloud/scope/machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func TestNewMachineScope(t *testing.T) {
}
for _, tc := range testCases {
g := NewWithT(t)
t.Run(tc.name, func(t *testing.T) {
t.Run(tc.name, func(_ *testing.T) {
_, err := NewMachineScope(tc.params)
// Note: only error/failure cases covered
// TO-DO: cover success cases
Expand Down
2 changes: 1 addition & 1 deletion cloud/scope/powervs_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func TestNewPowerVSClusterScope(t *testing.T) {
}
for _, tc := range testCases {
g := NewWithT(t)
t.Run(tc.name, func(t *testing.T) {
t.Run(tc.name, func(_ *testing.T) {
_, err := NewPowerVSClusterScope(tc.params)
// Note: only error/failure cases covered
// TO-DO: cover success cases
Expand Down
2 changes: 1 addition & 1 deletion cloud/scope/powervs_image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func TestNewPowerVSImageScope(t *testing.T) {
}
for _, tc := range testCases {
g := NewWithT(t)
t.Run(tc.name, func(t *testing.T) {
t.Run(tc.name, func(_ *testing.T) {
_, err := NewPowerVSImageScope(tc.params)
// Note: only error/failure cases covered
// TO-DO: cover success cases
Expand Down
2 changes: 1 addition & 1 deletion cloud/scope/powervs_machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func TestNewPowerVSMachineScope(t *testing.T) {
}
for _, tc := range testCases {
g := NewWithT(t)
t.Run(tc.name, func(t *testing.T) {
t.Run(tc.name, func(_ *testing.T) {
_, err := NewPowerVSMachineScope(tc.params)
// Note: only error/failure cases covered
// TO-DO: cover success cases
Expand Down
4 changes: 2 additions & 2 deletions cmd/capibmadm/cmd/powervs/image/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ capibmadm powervs image import --service-instance-id <service-instance-id> -b <b
_ = cmd.MarkFlagRequired("bucket-region")
_ = cmd.MarkFlagRequired("name")
_ = cmd.MarkFlagRequired("object")
cmd.PreRunE = func(cmd *cobra.Command, args []string) error {
cmd.PreRunE = func(_ *cobra.Command, _ []string) error {
case1 := imageImportOption.AccessKey == "" && imageImportOption.SecretKey != ""
case2 := imageImportOption.AccessKey != "" && imageImportOption.SecretKey == ""

Expand All @@ -95,7 +95,7 @@ capibmadm powervs image import --service-instance-id <service-instance-id> -b <b
return nil
}

cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
return importimage(cmd.Context(), imageImportOption)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/powervs/image/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func ListCommand() *cobra.Command {
# List PowerVS images
export IBMCLOUD_API_KEY=<api-key>
capibmadm powervs image list --service-instance-id <service-instance-id> --zone <zone>`,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
return listimage(cmd.Context())
},
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/capibmadm/cmd/powervs/key/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ Using file-path to SSH key : capibmadm powervs key create --name <key-name> --ke

// TODO: Flag validation is handled in PreRunE until the support for MarkFlagsMutuallyExclusiveAndRequired is available.
// Related issue: https://github.com/spf13/cobra/issues/1216
cmd.PreRunE = func(cmd *cobra.Command, args []string) error {
cmd.PreRunE = func(_ *cobra.Command, _ []string) error {
if (keyCreateOption.key == "") == (filePath == "") {
return fmt.Errorf("the required flags either file-path of SSH key or the SSH key within double quotation marks")
}
return nil
}

cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
if filePath != "" {
sshKey, err := os.ReadFile(filePath) // #nosec
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/powervs/key/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ capibmadm powervs key delete --name <key-name> --service-instance-id <service-in
cmd.Flags().StringVar(&keyName, "name", "", "The name of the SSH key.")
_ = cmd.MarkFlagRequired("name")

cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
return deleteSSHKey(cmd.Context(), keyName)
}
return cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/powervs/key/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func ListSSHKeyCommand() *cobra.Command {
# List PowerVS SSH Keys
export IBMCLOUD_API_KEY=<api-key>
capibmadm powervs key list --service-instance-id <service-instance-id> --zone <zone>`,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
return listSSHKeys(cmd.Context())
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/powervs/network/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Private network with ip address ranges: capibmadm powervs network create --priva
// cidr is required for private vlan
cmd.MarkFlagsRequiredTogether("private", "cidr")

cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
return createNetwork(cmd.Context(), netCreateOption)
}
return cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/powervs/network/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ capibmadm powervs network delete --network <network-name/network-id> --service-i
cmd.Flags().StringVar(&networkID, "network", "", "Network ID or Name")
_ = cmd.MarkFlagRequired("network")

cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
return deleteNetwork(cmd.Context(), networkID)
}
return cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/powervs/network/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func ListCommand() *cobra.Command {
# List PowerVS networks
export IBMCLOUD_API_KEY=<api-key>
capibmadm powervs network list --service-instance-id <service-instance-id> --zone <zone>`,
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
return listNetwork(cmd.Context())
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/powervs/port/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ capibmadm powervs port create --network <netword-id/network-name> --description
cmd.Flags().StringVar(&portCreateOption.network, "network", "", "Network ID or Name on which port is to be created")
cmd.Flags().StringVar(&portCreateOption.ipAddress, "ip-address", "", "IP Address to be assigned to the port")
cmd.Flags().StringVar(&portCreateOption.description, "description", "", "Description of the port")
cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
return createPort(cmd.Context(), portCreateOption)
}
options.AddCommonFlags(cmd)
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/powervs/port/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ capibmadm powervs port delete --port-id <port-id> --network <network-name/networ
_ = cmd.MarkFlagRequired("port-id")
_ = cmd.MarkFlagRequired("network")

cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
return deletePort(cmd.Context(), portDeleteOption)
}
return cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/powervs/port/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func ListCommand() *cobra.Command {
cmd.Flags().StringVar(&network, "network", "", "Network ID or Name")
_ = cmd.MarkFlagRequired("network")

cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
return listPorts(cmd.Context(), network)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/powervs/powervs.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func Commands() *cobra.Command {
cmd := &cobra.Command{
Use: "powervs",
Short: "Commands for operations on PowerVS resources",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
PersistentPreRunE: func(_ *cobra.Command, _ []string) error {
apiKey := os.Getenv(options.IBMCloudAPIKeyEnvName)
if apiKey == "" {
return fmt.Errorf("ibmcloud api key is not provided, set %s environmental variable", options.IBMCloudAPIKeyEnvName)
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func Commands(out io.Writer) *cobra.Command {
Use: "version",
Short: "Print version of capibmadm",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
return runVersion(out, cmd)
},
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/vpc/image/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func ListCommand() *cobra.Command {

options.AddCommonFlags(cmd)

cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
return listImages(cmd.Context(), options.GlobalOptions.ResourceGroupName)
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/capibmadm/cmd/vpc/key/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ Using file-path to SSH key : capibmadm vpc key create --name <key-name> --region
_ = cmd.MarkFlagRequired("name")
// TODO: Flag validation is handled in PreRunE until the support for MarkFlagsMutuallyExclusiveAndRequired is available.
// Related issue: https://github.com/spf13/cobra/issues/1216
cmd.PreRunE = func(cmd *cobra.Command, args []string) error {
cmd.PreRunE = func(_ *cobra.Command, _ []string) error {
if (keyCreateOption.publicKey == "") == (filePath == "") {
return fmt.Errorf("the required flags either key-path of SSH key or the public-key within double quotation marks is not found")
}
return nil
}
cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
if filePath != "" {
sshKey, err := os.ReadFile(filePath) // #nosec
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/vpc/key/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ capibmadm vpc key delete --name <key-name> --region <region>`,
var keyDeleteOption keyDeleteOptions
cmd.Flags().StringVar(&keyDeleteOption.name, "name", keyDeleteOption.name, "Key Name")
_ = cmd.MarkFlagRequired("name")
cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(_ *cobra.Command, _ []string) error {
return deleteKey(keyDeleteOption)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/vpc/key/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ capibmadm vpc key list --region <region> --resource-group-name <resource-group-n

options.AddCommonFlags(cmd)

cmd.RunE = func(cmd *cobra.Command, args []string) error {
cmd.RunE = func(cmd *cobra.Command, _ []string) error {
return listKeys(cmd.Context())
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/capibmadm/cmd/vpc/vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func Commands() *cobra.Command {
cmd := &cobra.Command{
Use: "vpc",
Short: "Commands for operations on VPC resources",
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
PersistentPreRunE: func(_ *cobra.Command, _ []string) error {
apiKey := os.Getenv(options.IBMCloudAPIKeyEnvName)
if apiKey == "" {
return fmt.Errorf("ibmcloud api key is not provided, set %s environmental variable", options.IBMCloudAPIKeyEnvName)
Expand Down
16 changes: 8 additions & 8 deletions controllers/ibmpowervsimage_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) {
}

imageScope.IBMPowerVSImage.Status.JobID = jobID
t.Run("When failed to get the import job using jobID", func(t *testing.T) {
t.Run("When failed to get the import job using jobID", func(_ *testing.T) {
mockpowervs.EXPECT().GetJob(gomock.AssignableToTypeOf(jobID)).Return(nil, errors.New("Error finding the job"))
result, err := reconciler.reconcile(powervsCluster, imageScope)
g.Expect(err).To(Not(BeNil()))
Expand All @@ -224,7 +224,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) {
State: pointer.String("queued"),
},
}
t.Run("When import job status is queued", func(t *testing.T) {
t.Run("When import job status is queued", func(_ *testing.T) {
mockpowervs.EXPECT().GetJob(gomock.AssignableToTypeOf(jobID)).Return(job, nil)
result, err := reconciler.reconcile(powervsCluster, imageScope)
g.Expect(err).To(BeNil())
Expand All @@ -234,7 +234,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) {
expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageImportedCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityInfo, string(infrav1beta2.PowerVSImageStateQue)}})
g.Expect(result.RequeueAfter).To(Not(BeZero()))
})
t.Run("When importing image is still in progress", func(t *testing.T) {
t.Run("When importing image is still in progress", func(_ *testing.T) {
job.Status.State = pointer.String("")
mockpowervs.EXPECT().GetJob(gomock.AssignableToTypeOf("job-1")).Return(job, nil)
result, err := reconciler.reconcile(powervsCluster, imageScope)
Expand All @@ -245,7 +245,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) {
expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageImportedCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityInfo, *job.Status.State}})
g.Expect(result.RequeueAfter).To(Not(BeZero()))
})
t.Run("When import job status is failed", func(t *testing.T) {
t.Run("When import job status is failed", func(_ *testing.T) {
job.Status.State = pointer.String("failed")
mockpowervs.EXPECT().GetJob(gomock.AssignableToTypeOf("job-1")).Return(job, nil)
result, err := reconciler.reconcile(powervsCluster, imageScope)
Expand All @@ -265,7 +265,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) {
},
},
}
t.Run("When import job status is completed and fails to get the image details", func(t *testing.T) {
t.Run("When import job status is completed and fails to get the image details", func(_ *testing.T) {
mockpowervs.EXPECT().GetJob(gomock.AssignableToTypeOf("job-1")).Return(job, nil)
mockpowervs.EXPECT().GetAllImage().Return(images, nil)
mockpowervs.EXPECT().GetImage(gomock.AssignableToTypeOf("capi-image-id")).Return(nil, errors.New("Failed to the image details"))
Expand All @@ -280,7 +280,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) {
ImageID: pointer.String("capi-image-id"),
State: "queued",
}
t.Run("When import job status is completed and image state is queued", func(t *testing.T) {
t.Run("When import job status is completed and image state is queued", func(_ *testing.T) {
mockpowervs.EXPECT().GetJob(gomock.AssignableToTypeOf("job-1")).Return(job, nil)
mockpowervs.EXPECT().GetAllImage().Return(images, nil)
mockpowervs.EXPECT().GetImage(gomock.AssignableToTypeOf("capi-image-id")).Return(image, nil)
Expand All @@ -291,7 +291,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) {
expectConditionsImage(g, imageScope.IBMPowerVSImage, []conditionAssertion{{infrav1beta2.ImageReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityWarning, infrav1beta2.ImageNotReadyReason}})
g.Expect(result.RequeueAfter).To(Not(BeZero()))
})
t.Run("When import job status is completed and image state is undefined", func(t *testing.T) {
t.Run("When import job status is completed and image state is undefined", func(_ *testing.T) {
image.State = "unknown"
mockpowervs.EXPECT().GetJob(gomock.AssignableToTypeOf("job-1")).Return(job, nil)
mockpowervs.EXPECT().GetAllImage().Return(images, nil)
Expand All @@ -303,7 +303,7 @@ func TestIBMPowerVSImageReconciler_reconcile(t *testing.T) {
g.Expect(imageScope.IBMPowerVSImage.Status.Ready).To(Equal(false))
g.Expect(result.RequeueAfter).To(Not(BeZero()))
})
t.Run("When import job status is completed and image state is active", func(t *testing.T) {
t.Run("When import job status is completed and image state is active", func(_ *testing.T) {
image.State = "active"
mockpowervs.EXPECT().GetJob(gomock.AssignableToTypeOf("job-1")).Return(job, nil)
mockpowervs.EXPECT().GetAllImage().Return(images, nil)
Expand Down
8 changes: 4 additions & 4 deletions controllers/ibmpowervsmachine_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) {
g.Expect(machineScope.IBMPowerVSMachine.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSMachineFinalizer))
expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityWarning, infrav1beta2.InstanceNotReadyReason}})

t.Run("When PVM instance is in SHUTOFF state", func(t *testing.T) {
t.Run("When PVM instance is in SHUTOFF state", func(_ *testing.T) {
instance.Status = pointer.String("SHUTOFF")
mockpowervs.EXPECT().GetAllInstance().Return(instanceReferences, nil)
mockpowervs.EXPECT().GetInstance(gomock.AssignableToTypeOf("capi-test-machine-id")).Return(instance, nil)
Expand All @@ -566,7 +566,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) {
g.Expect(machineScope.IBMPowerVSMachine.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSMachineFinalizer))
expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityError, infrav1beta2.InstanceStoppedReason}})
})
t.Run("When PVM instance is in ACTIVE state", func(t *testing.T) {
t.Run("When PVM instance is in ACTIVE state", func(_ *testing.T) {
instance.Status = pointer.String("ACTIVE")
mockpowervs.EXPECT().GetAllInstance().Return(instanceReferences, nil)
mockpowervs.EXPECT().GetInstance(gomock.AssignableToTypeOf("capi-test-machine-id")).Return(instance, nil)
Expand All @@ -577,7 +577,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) {
g.Expect(machineScope.IBMPowerVSMachine.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSMachineFinalizer))
expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{conditionType: infrav1beta2.InstanceReadyCondition, status: corev1.ConditionTrue}})
})
t.Run("When PVM instance is in ERROR state", func(t *testing.T) {
t.Run("When PVM instance is in ERROR state", func(_ *testing.T) {
instance.Status = pointer.String("ERROR")
instance.Fault = &models.PVMInstanceFault{Details: "Timeout creating instance"}
mockpowervs.EXPECT().GetAllInstance().Return(instanceReferences, nil)
Expand All @@ -589,7 +589,7 @@ func TestIBMPowerVSMachineReconciler_ReconcileOperations(t *testing.T) {
g.Expect(machineScope.IBMPowerVSMachine.Finalizers).To(ContainElement(infrav1beta2.IBMPowerVSMachineFinalizer))
expectConditions(g, machineScope.IBMPowerVSMachine, []conditionAssertion{{infrav1beta2.InstanceReadyCondition, corev1.ConditionFalse, capiv1beta1.ConditionSeverityError, infrav1beta2.InstanceErroredReason}})
})
t.Run("When PVM instance is in unknown state", func(t *testing.T) {
t.Run("When PVM instance is in unknown state", func(_ *testing.T) {
instance.Status = pointer.String("UNKNOWN")
mockpowervs.EXPECT().GetAllInstance().Return(instanceReferences, nil)
mockpowervs.EXPECT().GetInstance(gomock.AssignableToTypeOf("capi-test-machine-id")).Return(instance, nil)
Expand Down
Loading

0 comments on commit 0f5bb7e

Please sign in to comment.