@@ -75,7 +75,7 @@ func createTestRegistryPod(ctx context.Context, cli client.Client, namespace, pr
7575 Containers : []corev1.Container {{
7676 Name : "registry" ,
7777 // TODO: switch to using locally built and loaded images to avoid flakes
78- Image : "quay.io/ankitathomas/index:prometheus-index-v0.37.0 " ,
78+ Image : "quay.io/ankitathomas/index:quay " ,
7979 Ports : []corev1.ContainerPort {
8080 {
8181 Name : "grpc" ,
@@ -155,32 +155,6 @@ func createTestRegistryService(ctx context.Context, cli client.Client, namespace
155155 err := c .Create (ctx , svc )
156156 Expect (err ).To (BeNil ())
157157
158- // svcAddress := getServiceAddress(ctx, cli, namespace, svc.Name)
159-
160- // conn, err := grpc.Dial(svcAddress, grpc.WithInsecure())
161- // Expect(err).ToNot(HaveOccurred())
162-
163- // fmt.Println("svcAddress", svcAddress)
164- // connectionContext, cancel := context.WithTimeout(context.Background(), 30*time.Second)
165- // defer cancel()
166-
167- // defer conn.Close()
168- // oldState := conn.GetState()
169- // Eventually(func(g Gomega) {
170- // state := conn.GetState()
171- // if state != connectivity.Ready {
172- // if conn.WaitForStateChange(connectionContext, conn.GetState()) {
173- // state = conn.GetState()
174- // if oldState != state {
175- // oldState = state
176- // if state == connectivity.Idle {
177- // conn.Connect()
178- // }
179- // }
180- // }
181- // }
182- // g.Expect(conn.GetState()).To(Equal(connectivity.Ready))
183- // }).WithTimeout(2 * time.Minute).Should(Succeed())
184158 return svc .Name
185159}
186160
@@ -191,6 +165,7 @@ func getServiceAddress(ctx context.Context, cli client.Client, namespace, name s
191165 return fmt .Sprintf ("%s.%s.svc:%d" , svc .Name , svc .Namespace , svc .Spec .Ports [0 ].Port )
192166}
193167
168+ // TODO: ensure CRD support in test environment setup in Makefile
194169func applyCRDifNotPresent (ctx context.Context ) func () {
195170 cleanup := func () {}
196171 scheme := runtime .NewScheme ()
@@ -245,7 +220,8 @@ func createTestCatalogSource(ctx context.Context, cli client.Client, namespace,
245220 Namespace : namespace ,
246221 },
247222 Spec : v1alpha1.CatalogSourceSpec {
248- Address : getServiceAddress (ctx , cli , namespace , serviceName ),
223+ Address : getServiceAddress (ctx , cli , namespace , serviceName ),
224+ SourceType : v1alpha1 .SourceTypeGrpc ,
249225 },
250226 })
251227 Expect (err ).To (BeNil ())
0 commit comments