From af39ddd3bc8a5b0a1c7c996e204fd79a8b777ce5 Mon Sep 17 00:00:00 2001 From: Amanuel Engeda Date: Mon, 15 Apr 2024 10:14:39 -0700 Subject: [PATCH] Excluded cluster should not be run for soak testing --- 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), }) } }