Skip to content

Commit

Permalink
Follow up in tests
Browse files Browse the repository at this point in the history
Signed-off-by: György Krajcsovits <[email protected]>
  • Loading branch information
krajorama committed Sep 5, 2022
1 parent 2e1676f commit d236af4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,11 @@ func TestRolloutController_ReconcileShouldDeleteMetricsForDecommissionedRolloutG
}

func mockStatefulSet(name string, overrides ...func(sts *v1.StatefulSet)) *v1.StatefulSet {
labelSelector := metav1.LabelSelector{
MatchLabels: map[string]string{
"name": name,
},
};
sts := &v1.StatefulSet{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Expand All @@ -387,6 +392,7 @@ func mockStatefulSet(name string, overrides ...func(sts *v1.StatefulSet)) *v1.St
},
},
},
Selector: &labelSelector,
},
Status: v1.StatefulSetStatus{
Replicas: 3,
Expand Down

0 comments on commit d236af4

Please sign in to comment.