(mainUrl, routingName string)
| 168 | } |
| 169 | |
| 170 | func markRoutingReady(mainUrl, routingName string) { |
| 171 | namespacedName := namespacedName(routingName, testNamespace) |
| 172 | routing := &controllerv1alpha1.DevWorkspaceRouting{} |
| 173 | Eventually(func() error { |
| 174 | err := k8sClient.Get(ctx, namespacedName, routing) |
| 175 | if err != nil { |
| 176 | return err |
| 177 | } |
| 178 | routing.Status.Phase = controllerv1alpha1.RoutingReady |
| 179 | mainAttributes := controllerv1alpha1.Attributes{} |
| 180 | mainAttributes.PutString("type", "main") |
| 181 | exposedEndpoint := controllerv1alpha1.ExposedEndpoint{ |
| 182 | Name: "test-endpoint", |
| 183 | Url: mainUrl, |
| 184 | Attributes: mainAttributes, |
| 185 | } |
| 186 | routing.Status.ExposedEndpoints = map[string]controllerv1alpha1.ExposedEndpointList{ |
| 187 | "test-endpoint": { |
| 188 | exposedEndpoint, |
| 189 | }, |
| 190 | } |
| 191 | return k8sClient.Status().Update(ctx, routing) |
| 192 | }, 30*time.Second, 250*time.Millisecond).Should(Succeed(), "Update DevWorkspaceRouting to have mainUrl and be ready") |
| 193 | } |
| 194 | |
| 195 | func markDeploymentReady(deploymentName string) { |
| 196 | namespacedName := namespacedName(deploymentName, testNamespace) |
no test coverage detected