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), }) } }