From 994ab3c82a2db14cf3da1d4ca158001d3b6e3483 Mon Sep 17 00:00:00 2001 From: croche Date: Tue, 23 Jul 2024 10:40:54 +0100 Subject: [PATCH] OCM-9833 | fix: remove dot import from machine pools --- pkg/aws/client_mock.go | 1 + pkg/machinepool/machinepool.go | 5 +++-- pkg/machinepool/machinepool_mock.go | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/pkg/aws/client_mock.go b/pkg/aws/client_mock.go index a4e87200a4..59172750c3 100644 --- a/pkg/aws/client_mock.go +++ b/pkg/aws/client_mock.go @@ -5,6 +5,7 @@ // // mockgen -source=client.go -package=aws -destination=client_mock.go // + // Package aws is a generated GoMock package. package aws diff --git a/pkg/machinepool/machinepool.go b/pkg/machinepool/machinepool.go index acdfd26e73..e61a61f1c7 100644 --- a/pkg/machinepool/machinepool.go +++ b/pkg/machinepool/machinepool.go @@ -26,7 +26,7 @@ import ( "github.com/openshift/rosa/pkg/interactive" "github.com/openshift/rosa/pkg/interactive/confirm" "github.com/openshift/rosa/pkg/interactive/securitygroups" - . "github.com/openshift/rosa/pkg/kubeletconfig" + "github.com/openshift/rosa/pkg/kubeletconfig" "github.com/openshift/rosa/pkg/ocm" ocmOutput "github.com/openshift/rosa/pkg/ocm/output" "github.com/openshift/rosa/pkg/output" @@ -1854,7 +1854,8 @@ func editNodePool(cmd *cobra.Command, nodePoolID string, return fmt.Errorf("Failed to create machine pool for hosted cluster '%s': %v", clusterKey, err) } - if isKubeletConfigSet && !promptForNodePoolNodeRecreate(nodePool, update, PromptToAcceptNodePoolNodeRecreate, r) { + if isKubeletConfigSet && !promptForNodePoolNodeRecreate( + nodePool, update, kubeletconfig.PromptToAcceptNodePoolNodeRecreate, r) { return nil } diff --git a/pkg/machinepool/machinepool_mock.go b/pkg/machinepool/machinepool_mock.go index 9e371e805b..6c241ac160 100644 --- a/pkg/machinepool/machinepool_mock.go +++ b/pkg/machinepool/machinepool_mock.go @@ -5,6 +5,7 @@ // // mockgen -source=machinepool.go -package=machinepool -destination=machinepool_mock.go // + // Package machinepool is a generated GoMock package. package machinepool @@ -96,6 +97,20 @@ func (mr *MockMachinePoolServiceMockRecorder) DescribeMachinePool(r, cluster, cl return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeMachinePool", reflect.TypeOf((*MockMachinePoolService)(nil).DescribeMachinePool), r, cluster, clusterKey, machinePoolId) } +// EditMachinePool mocks base method. +func (m *MockMachinePoolService) EditMachinePool(cmd *cobra.Command, machinePoolID, clusterKey string, cluster *v1.Cluster, r *rosa.Runtime) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "EditMachinePool", cmd, machinePoolID, clusterKey, cluster, r) + ret0, _ := ret[0].(error) + return ret0 +} + +// EditMachinePool indicates an expected call of EditMachinePool. +func (mr *MockMachinePoolServiceMockRecorder) EditMachinePool(cmd, machinePoolID, clusterKey, cluster, r any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EditMachinePool", reflect.TypeOf((*MockMachinePoolService)(nil).EditMachinePool), cmd, machinePoolID, clusterKey, cluster, r) +} + // ListMachinePools mocks base method. func (m *MockMachinePoolService) ListMachinePools(r *rosa.Runtime, clusterKey string, cluster *v1.Cluster) error { m.ctrl.T.Helper()