(namespace, deploymentName, containerImage, containerName string)
| 104 | } |
| 105 | |
| 106 | func ExpectContainerNameAndImageEqual(namespace, deploymentName, containerImage, containerName string) { |
| 107 | kubeClient, err := kube.NewKubeHelper() |
| 108 | ExpectNoErrorWithOffset(1, err) |
| 109 | err = wait.PollUntilContextTimeout(context.TODO(), time.Second, time.Minute*2, true, func(_ context.Context) (done bool, err error) { |
| 110 | deploy, err := kubeClient.RawClient().AppsV1().Deployments(namespace).Get(context.TODO(), |
| 111 | deploymentName, metav1.GetOptions{}) |
| 112 | if err != nil { |
| 113 | return false, nil |
| 114 | } |
| 115 | return deploy.Spec.Template.Spec.Containers[0].Name == containerName && |
| 116 | deploy.Spec.Template.Spec.Containers[0].Image == containerImage, nil |
| 117 | }) |
| 118 | ExpectNoErrorWithOffset(1, err) |
| 119 | } |
| 120 | |
| 121 | func ExpectRemoteCurlContains(imageSelector string, namespace string, urlString string, contents string) { |
| 122 | kubeClient, err := kube.NewKubeHelper() |
no test coverage detected