From ed7564c6d3320e20806850f317d0be3297fa2ae6 Mon Sep 17 00:00:00 2001 From: Amanuel Engeda <74629455+engedaam@users.noreply.github.com> Date: Mon, 15 Apr 2024 10:22:53 -0700 Subject: [PATCH] ci: Excluded cluster should not be run for Soak Testing (#6041) --- test/hack/soak/get_clusters.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/hack/soak/get_clusters.go b/test/hack/soak/get_clusters.go index 936ea4c16033..4cd9e27481cf 100644 --- a/test/hack/soak/get_clusters.go +++ b/test/hack/soak/get_clusters.go @@ -57,15 +57,11 @@ func main() { createNewCluster = false } - if strings.HasPrefix(c, "soak-periodic-") { + if strings.HasPrefix(c, "soak-periodic-") && !slices.Contains(excludedClustersCleanup, c) { outputList = append(outputList, &cluster{ - Name: c, - GitRef: clusterDetails.Cluster.Tags["test/git_ref"], - Cleanup: lo.Ternary( - slices.Contains(excludedClustersCleanup, c), - false, - clusterDetails.Cluster.CreatedAt.Before(expirationTime), - ), + Name: c, + GitRef: clusterDetails.Cluster.Tags["test/git_ref"], + Cleanup: clusterDetails.Cluster.CreatedAt.Before(expirationTime), }) } }