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

Function ExpectLocalFileContents

e2e/framework/helper.go:184–198  ·  view source on GitHub ↗
(filePath string, contents string)

Source from the content-addressed store, hash-verified

182}
183
184func ExpectLocalFileContents(filePath string, contents string) {
185 err := wait.PollUntilContextTimeout(context.TODO(), time.Second, time.Minute*2, true, func(_ context.Context) (done bool, err error) {
186 out, err := os.ReadFile(filePath)
187 if err != nil {
188 if !os.IsNotExist(err) {
189 return false, err
190 }
191
192 return false, nil
193 }
194
195 return string(out) == contents, nil
196 })
197 ExpectNoErrorWithOffset(1, err)
198}
199
200func ExpectLocalFileContentsWithoutSpaces(filePath string, contents string) {
201 out, err := os.ReadFile(filePath)

Callers 4

proxycommands.goFile · 0.92
pipelines.goFile · 0.92
sync.goFile · 0.92
dependencies.goFile · 0.92

Calls 1

ExpectNoErrorWithOffsetFunction · 0.85

Tested by

no test coverage detected