From 12a7bc4add931e2d3fb35c9c15f4fa6d7913a324 Mon Sep 17 00:00:00 2001 From: Trung Minh Lai Date: Mon, 18 Nov 2024 14:16:48 +0700 Subject: [PATCH] Modify the UT. --- pkg/cluster/k8sres_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/cluster/k8sres_test.go b/pkg/cluster/k8sres_test.go index 3844b9d78..61e0e2cf9 100644 --- a/pkg/cluster/k8sres_test.go +++ b/pkg/cluster/k8sres_test.go @@ -4291,6 +4291,16 @@ func TestTopologySpreadConstraints(t *testing.T) { Volume: acidv1.Volume{ Size: "1G", }, + TopologySpreadConstraints: []v1.TopologySpreadConstraint{ + { + MaxSkew: 1, + TopologyKey: "topology.kubernetes.io/zone", + WhenUnsatisfiable: v1.DoNotSchedule, + LabelSelector: &metav1.LabelSelector{ + MatchLabels: cluster.labelsSet(true), + }, + }, + }, }, }