(t *testing.T)
| 31 | } |
| 32 | |
| 33 | func collectExamples(t *testing.T) []string { |
| 34 | t.Helper() |
| 35 | |
| 36 | var files []string |
| 37 | err := filepath.WalkDir(filepath.Join("..", "..", "examples"), func(path string, d fs.DirEntry, err error) error { |
| 38 | if err != nil { |
| 39 | return err |
| 40 | } |
| 41 | if !d.IsDir() { |
| 42 | ext := filepath.Ext(path) |
| 43 | if ext == ".yaml" || ext == ".hcl" { |
| 44 | files = append(files, path) |
| 45 | } |
| 46 | } |
| 47 | return nil |
| 48 | }) |
| 49 | require.NoError(t, err) |
| 50 | assert.NotEmpty(t, files) |
| 51 | |
| 52 | return files |
| 53 | } |
| 54 | |
| 55 | func TestParseExamples(t *testing.T) { |
| 56 | t.Parallel() |
no outgoing calls
no test coverage detected