From debb5a0ef2a2eaff8b19bb0b4520c1b6c3544a13 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 910ca4e26..6df1c1abd 100644 --- a/pkg/cluster/k8sres_test.go +++ b/pkg/cluster/k8sres_test.go @@ -4003,6 +4003,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), + }, + }, + }, }, }