MCPcopy Create free account
hub / github.com/crytic/attacknet / LoadSuiteConfigFromName

Function LoadSuiteConfigFromName

pkg/project/config.go:24–40  ·  view source on GitHub ↗
(suiteName string)

Source from the content-addressed store, hash-verified

22}
23
24func LoadSuiteConfigFromName(suiteName string) (*types.ConfigParsed, error) {
25 dir, err := os.Getwd()
26 if err != nil {
27 return nil, err
28 }
29
30 suiteName = suiteName + ".yaml"
31 suiteFilePath := filepath.Join(dir, suiteDirectory, suiteName)
32
33 log.Infof("Loading test suite from %s", suiteFilePath)
34 cfg, err := loadSuiteFromPath(suiteFilePath)
35 if err != nil {
36 return nil, err
37 }
38
39 return cfg, nil
40}
41
42func loadSuiteFromPath(path string) (*types.ConfigParsed, error) {
43 data, err := os.ReadFile(path)

Callers 1

mainFunction · 0.92

Calls 1

loadSuiteFromPathFunction · 0.85

Tested by

no test coverage detected