Skip to content

Commit 4bbf55e

Browse files
Merge pull request #30422 from ropatil010/fix-hcpname
NO-JIRA: fix hcpclustername
2 parents 8941163 + 14e3171 commit 4bbf55e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/extended/util/compat_otp/hypeshift_cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func ROSAValidHypershiftAndGetGuestKubeConf(oc *exutil.CLI) (string, string, str
211211
e2e.Logf("can't get hostedcluster name %s SHARE_DIR: %s", err.Error(), os.Getenv("SHARED_DIR"))
212212
return "", "", ""
213213
}
214-
clusterName := strings.ReplaceAll(string(data), "\n", "")
214+
clusterName := strings.TrimSpace(string(data))
215215
hostedclusterNS, _ := oc.AsAdmin().WithoutNamespace().Run("get").Args("-A", "hostedclusters", `-o=jsonpath={.items[?(@.metadata.name=="`+clusterName+`")].metadata.namespace}`).Output()
216216
if len(hostedclusterNS) <= 0 {
217217
e2e.Logf("there is no hosted cluster NS in mgmt cluster")

0 commit comments

Comments
 (0)