diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider.go index 962917cf2f6e..07bef861088d 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider.go @@ -71,7 +71,7 @@ func (n *nodePool) IncreaseSize(delta int) error { if delta <= 0 { return errors.New("size increase must be positive") } - size, err := n.manager.GetNodeGroupSize(n) + size, err := n.manager.GetNodeGroupTargetSize(n) if err != nil { return err } diff --git a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider_test.go b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider_test.go index 0086d8035ce6..3a182689a7ed 100644 --- a/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider_test.go +++ b/cluster-autoscaler/cloudprovider/ionoscloud/ionoscloud_cloud_provider_test.go @@ -113,18 +113,18 @@ func (s *NodeGroupTestSuite) TestIncreaseSize_InvalidDelta() { } func (s *NodeGroupTestSuite) TestIncreaseSize_GetSizeError() { - s.manager.On("GetNodeGroupSize", s.nodePool).Return(0, errors.New("error")).Once() + s.manager.On("GetNodeGroupTargetSize", s.nodePool).Return(0, errors.New("error")).Once() s.Error(s.nodePool.IncreaseSize(2)) } func (s *NodeGroupTestSuite) TestIncreaseSize_SetSizeError() { - s.manager.On("GetNodeGroupSize", s.nodePool).Return(2, nil).Once() + s.manager.On("GetNodeGroupTargetSize", s.nodePool).Return(2, nil).Once() s.manager.On("SetNodeGroupSize", s.nodePool, 3).Return(errors.New("error")).Once() s.Error(s.nodePool.IncreaseSize(1)) } func (s *NodeGroupTestSuite) TestIncreaseSize_OK() { - s.manager.On("GetNodeGroupSize", s.nodePool).Return(2, nil).Once() + s.manager.On("GetNodeGroupTargetSize", s.nodePool).Return(2, nil).Once() s.manager.On("SetNodeGroupSize", s.nodePool, 3).Return(nil).Once() s.NoError(s.nodePool.IncreaseSize(1)) }