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

Function ExpectRemoteCurlContains

e2e/framework/helper.go:121–132  ·  view source on GitHub ↗
(imageSelector string, namespace string, urlString string, contents string)

Source from the content-addressed store, hash-verified

119}
120
121func ExpectRemoteCurlContains(imageSelector string, namespace string, urlString string, contents string) {
122 kubeClient, err := kube.NewKubeHelper()
123 ExpectNoErrorWithOffset(1, err)
124 err = wait.PollUntilContextTimeout(context.TODO(), time.Second, time.Minute*2, true, func(_ context.Context) (done bool, err error) {
125 out, err := kubeClient.ExecByImageSelector(imageSelector, namespace, []string{"curl", urlString})
126 if err != nil {
127 return false, nil
128 }
129 return strings.Contains(strings.TrimSpace(out), strings.TrimSpace(contents)), nil
130 })
131 ExpectNoErrorWithOffset(1, err)
132}
133
134func ExpectRemoteFileNotFound(imageSelector string, namespace string, filePath string) {
135 kubeClient, err := kube.NewKubeHelper()

Callers 1

portforward.goFile · 0.92

Calls 3

ExecByImageSelectorMethod · 0.95
NewKubeHelperFunction · 0.92
ExpectNoErrorWithOffsetFunction · 0.85

Tested by

no test coverage detected