MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / LoadFixture

Function LoadFixture

internal/testutil/mock_api.go:146–152  ·  view source on GitHub ↗

LoadFixture reads a JSON fixture file from testdata/.

(name string)

Source from the content-addressed store, hash-verified

144
145// LoadFixture reads a JSON fixture file from testdata/.
146func LoadFixture(name string) string {
147 data, err := os.ReadFile(filepath.Join(TestdataDir(), name))
148 if err != nil {
149 panic("failed to load fixture " + name + ": " + err.Error())
150 }
151 return string(data)
152}

Calls 2

TestdataDirFunction · 0.85
ErrorMethod · 0.80