Skip to content

Commit 79a6580

Browse files
committed
test fix for isolated env
1 parent ad6c398 commit 79a6580

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/e2e/config_secret_utils.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"context"
2121
"fmt"
2222
"os/exec"
23+
"regexp"
2324
"strings"
2425

2526
"github.com/onsi/ginkgo/v2"
@@ -358,7 +359,9 @@ func getClusterNames(masterIp string, sshClientConfig *ssh.ClientConfig,
358359
cluster, masterIp, err)
359360
}
360361
clusDetails = nil
361-
if !strings.Contains(clusterResult.Stdout, "10.") {
362+
ipRegex := regexp.MustCompile(`\b(?:\d{1,3}\.){3}\d{1,3}\b`)
363+
// if !strings.Contains(clusterResult.Stdout, "10.") || !strings.Contains(clusterResult.Stdout, "192.") {
364+
if !ipRegex.MatchString(clusterResult.Stdout) {
362365
if clusterResult.Stdout != "" {
363366
clusListTemp := strings.Split(clusterResult.Stdout, "\n")
364367
clusDetails = append(clusDetails, clusListTemp...)

0 commit comments

Comments
 (0)