diff --git a/internal/controller/multiclusterservice_controller.go b/internal/controller/multiclusterservice_controller.go index 20b1dd69..d2bd10fd 100644 --- a/internal/controller/multiclusterservice_controller.go +++ b/internal/controller/multiclusterservice_controller.go @@ -239,7 +239,7 @@ func updateServicesStatus(ctx context.Context, c client.Client, profileRef clien idx = len(servicesStatus) - 1 } - conditions, err := sveltos.SetStatusConditions(&summary) + conditions, err := sveltos.GetStatusConditions(&summary) if err != nil { return nil, err } diff --git a/internal/sveltos/status.go b/internal/sveltos/status.go index 25e9b294..61bddfe3 100644 --- a/internal/sveltos/status.go +++ b/internal/sveltos/status.go @@ -25,8 +25,8 @@ import ( hmc "github.com/Mirantis/hmc/api/v1alpha1" ) -// SetStatusConditions creates & sets a list of conditions from provided ClusterSummary and returns it. -func SetStatusConditions(summary *sveltosv1beta1.ClusterSummary) ([]metav1.Condition, error) { +// GetStatusConditions returns a list of conditions from provided ClusterSummary. +func GetStatusConditions(summary *sveltosv1beta1.ClusterSummary) ([]metav1.Condition, error) { if summary == nil { return nil, errors.New("error getting status from ClusterSummary: nil summary provided") } diff --git a/internal/sveltos/status_test.go b/internal/sveltos/status_test.go index f0ebb107..2fb21c35 100644 --- a/internal/sveltos/status_test.go +++ b/internal/sveltos/status_test.go @@ -134,7 +134,7 @@ func TestSetStatusConditions(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - conditions, err := SetStatusConditions(&tc.summary) + conditions, err := GetStatusConditions(&tc.summary) require.NoError(t, err) assert.Len(t, conditions, 1) assert.Equal(t, tc.expectCondition.Type, conditions[0].Type)