(filePath string, contents string)
| 182 | } |
| 183 | |
| 184 | func 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 | |
| 200 | func ExpectLocalFileContentsWithoutSpaces(filePath string, contents string) { |
| 201 | out, err := os.ReadFile(filePath) |
no test coverage detected