MCPcopy Index your code
hub / github.com/perkeep/perkeep / TestConfigs

Function TestConfigs

pkg/serverinit/serverinit_test.go:84–108  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

82}
83
84func TestConfigs(t *testing.T) {
85 dir, err := os.Open("testdata")
86 if err != nil {
87 t.Fatal(err)
88 }
89 names, err := dir.Readdirnames(-1)
90 if err != nil {
91 t.Fatal(err)
92 }
93 for _, name := range names {
94 if strings.HasPrefix(name, ".#") {
95 // Emacs noise.
96 continue
97 }
98 if *flagOnly != "" && !strings.Contains(name, *flagOnly) {
99 continue
100 }
101 if strings.HasSuffix(name, ".json") {
102 if strings.HasSuffix(name, "-want.json") {
103 continue
104 }
105 testConfig(filepath.Join("testdata", name), t)
106 }
107 }
108}
109
110type namedReadSeeker struct {
111 name string

Callers

nothing calls this directly

Calls 5

testConfigFunction · 0.85
FatalMethod · 0.80
HasPrefixMethod · 0.80
ContainsMethod · 0.80
OpenMethod · 0.65

Tested by

no test coverage detected