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

Function ExpectRemoteFileContents

e2e/framework/helper.go:80–93  ·  view source on GitHub ↗
(imageSelector string, namespace string, filePath string, contents string)

Source from the content-addressed store, hash-verified

78}
79
80func ExpectRemoteFileContents(imageSelector string, namespace string, filePath string, contents string) {
81 kubeClient, err := kube.NewKubeHelper()
82 ExpectNoErrorWithOffset(1, err)
83
84 err = wait.PollUntilContextTimeout(context.TODO(), time.Second, time.Minute*2, true, func(_ context.Context) (done bool, err error) {
85 out, err := kubeClient.ExecByImageSelector(imageSelector, namespace, []string{"cat", filePath})
86 if err != nil {
87 return false, nil
88 }
89
90 return strings.TrimSpace(out) == strings.TrimSpace(contents), nil
91 })
92 ExpectNoErrorWithOffset(1, err)
93}
94
95func ExpectLocalCurlContains(urlString string, contents string) {
96 client := resty.New()

Callers 5

proxycommands.goFile · 0.92
terminal.goFile · 0.92
replacepods.goFile · 0.92
sync.goFile · 0.92
dependencies.goFile · 0.92

Calls 3

ExecByImageSelectorMethod · 0.95
NewKubeHelperFunction · 0.92
ExpectNoErrorWithOffsetFunction · 0.85

Tested by

no test coverage detected