Skip to content

Commit

Permalink
Update status for Recommendation CR (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
mszostok authored Feb 4, 2025
1 parent 075e990 commit ab28ff0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion internal/services/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ func loadInitialHappyPathData(t *testing.T, scheme *runtime.Scheme) ([]sampleObj
"apiVersion": "%s/%s",
"metadata": {
"name": "%s",
"namespace": "default"
"namespace": "default"
}
}`
return []byte(fmt.Sprintf(t, kind, group, version, name))
Expand Down Expand Up @@ -694,6 +694,16 @@ func loadInitialHappyPathData(t *testing.T, scheme *runtime.Scheme) ([]sampleObj
Name: crd.RecommendationGVR.Resource,
Namespace: v1.NamespaceDefault,
},
Status: crd.RecommendationStatus{
Conditions: []metav1.Condition{
{
Type: "Healthy",
Status: "True",
ObservedGeneration: 1,
Reason: "ReconciledSuccessfully",
},
},
},
}

recommendationData := asJson(t, recommendation)
Expand Down
1 change: 1 addition & 0 deletions internal/services/controller/crd/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type RecommendationSpec struct {

// RecommendationStatus defines the observed state of Recommendation
type RecommendationStatus struct {
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

// +genclient
Expand Down

0 comments on commit ab28ff0

Please sign in to comment.