Correct the assert with the list of constraints.
This commit is contained in:
parent
63f865776e
commit
89e2405b8f
|
|
@ -4028,12 +4028,14 @@ func TestTopologySpreadConstraints(t *testing.T) {
|
|||
|
||||
s, err := cluster.generateStatefulSet(&pg.Spec)
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, s.Spec.Template.Spec.TopologySpreadConstraints, v1.TopologySpreadConstraint{
|
||||
assert.Contains(t, s.Spec.Template.Spec.TopologySpreadConstraints, []v1.TopologySpreadConstraint{
|
||||
{
|
||||
MaxSkew: int32(1),
|
||||
TopologyKey: "topology.kubernetes.io/zone",
|
||||
WhenUnsatisfiable: v1.DoNotSchedule,
|
||||
LabelSelector: &metav1.LabelSelector{
|
||||
MatchLabels: cluster.labelsSet(true),
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue