@@ -42,20 +42,20 @@ var _ = Describe("", Label(OptionalLabel, DNSLabel, ClusterIPLabel), func() {
42
42
43
43
By ("Retrieving ServiceImport" )
44
44
45
- serviceImport := t .awaitServiceImport (& clients [0 ], t .helloService .Name , func (serviceImport * v1alpha1.ServiceImport ) bool {
46
- return len (serviceImport .Spec .IPs ) > 0
47
- })
48
-
49
- Expect (serviceImport ).NotTo (BeNil (), "ServiceImport was not found" )
50
- Expect (serviceImport .Spec .IPs ).ToNot (BeEmpty (), "ServiceImport does not contain an IP" )
51
-
52
- clusterSetIP := serviceImport .Spec .IPs [0 ]
53
-
54
- By (fmt .Sprintf ("Found ServiceImport with clusterset IP %q" , clusterSetIP ))
45
+ serviceImports := []* v1alpha1.ServiceImport {}
46
+ for _ , client := range clients {
47
+ serviceImport := t .awaitServiceImport (& client , t .helloService .Name , func (serviceImport * v1alpha1.ServiceImport ) bool {
48
+ return len (serviceImport .Spec .IPs ) > 0
49
+ })
50
+ Expect (serviceImport ).NotTo (BeNil (), "ServiceImport was not found on cluster %q" , client .name )
51
+ Expect (serviceImport .Spec .IPs ).ToNot (BeEmpty (), "ServiceImport on cluster %q does not contain an IP" , client .name )
52
+ serviceImports = append (serviceImports , serviceImport )
53
+ }
55
54
56
55
command := []string {"sh" , "-c" , fmt .Sprintf ("nslookup %s.%s.svc.clusterset.local" , t .helloService .Name , t .namespace )}
57
-
58
- for _ , client := range clients {
56
+ for i , client := range clients {
57
+ clusterSetIP := serviceImports [i ].Spec .IPs [0 ]
58
+ By (fmt .Sprintf ("Found ServiceImport on cluster %q with clusterset IP %q" , client .name , clusterSetIP ))
59
59
By (fmt .Sprintf ("Executing command %q on cluster %q" , strings .Join (command , " " ), client .name ))
60
60
61
61
t .awaitCmdOutputContains (& client , command , clusterSetIP , 1 , reportNonConformant ("" ))
0 commit comments