createFiles is a test helper that creates files relative to rootDir.
(t *testing.T, rootDir string, files []string)
| 26 | |
| 27 | // createFiles is a test helper that creates files relative to rootDir. |
| 28 | func createFiles(t *testing.T, rootDir string, files []string) { |
| 29 | t.Helper() |
| 30 | for _, f := range files { |
| 31 | absPath := filepath.Join(rootDir, f) |
| 32 | require.NoError(t, os.MkdirAll(filepath.Dir(absPath), 0o755)) |
| 33 | require.NoError(t, os.WriteFile(absPath, []byte("test content"), 0o600)) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | func TestDiscoverAll(t *testing.T) { |
| 38 | tests := []struct { |