MCPcopy Index your code
hub / github.com/devspace-sh/devspace / ExpectContainerNameAndImageEqual

Function ExpectContainerNameAndImageEqual

e2e/framework/helper.go:106–119  ·  view source on GitHub ↗
(namespace, deploymentName, containerImage, containerName string)

Source from the content-addressed store, hash-verified

104}
105
106func 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
121func ExpectRemoteCurlContains(imageSelector string, namespace string, urlString string, contents string) {
122 kubeClient, err := kube.NewKubeHelper()

Callers 1

pipelines.goFile · 0.92

Calls 4

RawClientMethod · 0.95
NewKubeHelperFunction · 0.92
ExpectNoErrorWithOffsetFunction · 0.85
GetMethod · 0.45

Tested by

no test coverage detected