outerFiles returns the list of files in the outer container matching the given pattern. It does this by running `ls -1` in the outer container.
(ctx context.Context, t *testing.T, containerID, pattern string)
| 164 | // outerFiles returns the list of files in the outer container matching the |
| 165 | // given pattern. It does this by running `ls -1` in the outer container. |
| 166 | func outerFiles(ctx context.Context, t *testing.T, containerID, pattern string) []string { |
| 167 | t.Helper() |
| 168 | // We need to use /bin/sh -c to avoid the shell interpreting the glob. |
| 169 | out, err := execContainerCmd(ctx, t, containerID, "/bin/sh", "-c", "ls -1 "+pattern) |
| 170 | require.NoError(t, err, "failed to list outer container files") |
| 171 | files := strings.Split(strings.TrimSpace(out), "\n") |
| 172 | slices.Sort(files) |
| 173 | return files |
| 174 | } |
| 175 | |
| 176 | // assertInnerFiles checks that all the files matching the given pattern exist in the |
| 177 | // inner container. |
no test coverage detected