MCPcopy Index your code
hub / github.com/docker/docker-agent / collectExamples

Function collectExamples

pkg/teamloader/teamloader_test.go:38–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func collectExamples(t *testing.T) []string {
39 t.Helper()
40
41 var files []string
42 err := filepath.WalkDir(filepath.Join("..", "..", "examples"), func(path string, d fs.DirEntry, err error) error {
43 if err != nil {
44 return err
45 }
46 if !d.IsDir() && filepath.Ext(path) == ".yaml" {
47 if reason, skip := skipExamples[filepath.Base(path)]; skip {
48 t.Logf("Skipping %s: %s", path, reason)
49 return nil
50 }
51 files = append(files, path)
52 }
53 return nil
54 })
55 require.NoError(t, err)
56 assert.NotEmpty(t, files)
57
58 return files
59}
60
61type noEnvProvider struct{}
62

Callers 1

TestLoadExamplesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected