MCPcopy Create free account
hub / github.com/commander-cli/commander / getSuite

Function getSuite

pkg/app/test_command.go:178–196  ·  view source on GitHub ↗
(filePath string, fileName string)

Source from the content-addressed store, hash-verified

176}
177
178func getSuite(filePath string, fileName string) (suite.Suite, error) {
179 s := suite.Suite{}
180
181 content, err := readFile(filePath)
182 if err != nil {
183 return suite.Suite{}, err
184 }
185
186 overwriteContent := []byte("")
187 if overwriteConfigPath != "" {
188 overwriteContent, err = readFile(overwriteConfigPath)
189 if err != nil {
190 return suite.Suite{}, err
191 }
192 }
193
194 s = suite.NewSuite(content, overwriteContent, fileName)
195 return s, nil
196}
197
198func readFile(filePath string) ([]byte, error) {
199 f, err := os.Stat(filePath)

Callers 1

testFileFunction · 0.85

Calls 2

NewSuiteFunction · 0.92
readFileFunction · 0.85

Tested by

no test coverage detected