MCPcopy Create free account
hub / github.com/cloudwan/gohan / getTestCommand

Function getTestCommand

cli/cli.go:557–574  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

555}
556
557func getTestCommand() cli.Command {
558 return cli.Command{
559 Name: "test",
560 ShortName: "test",
561 Usage: "Run Gohan script Test",
562 Description: `
563Run gohan script yaml code.`,
564 Flags: []cli.Flag{
565 cli.StringFlag{Name: "config-file,c", Value: defaultConfigFile, Usage: "config file path"},
566 },
567 Action: func(c *cli.Context) {
568 dir := c.Args()[0]
569 configFile := c.String("config-file")
570 loadConfig(configFile)
571 gohanscript.RunTests(dir)
572 },
573 }
574}
575
576func loadConfig(configFile string) {
577 if configFile == "" {

Callers 1

RunFunction · 0.85

Calls 3

loadConfigFunction · 0.85
ArgsMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected