| 381 | } |
| 382 | |
| 383 | func getTestExtensionsCommand() cli.Command { |
| 384 | return cli.Command{ |
| 385 | Name: "test_extensions", |
| 386 | ShortName: "test_ex", |
| 387 | Usage: "Run extension tests", |
| 388 | Description: ` |
| 389 | Run extensions tests in a gohan-server-like environment. |
| 390 | |
| 391 | Test files and directories can be supplied as arguments. See Gohan |
| 392 | documentation for detail information about writing tests.`, |
| 393 | Flags: []cli.Flag{ |
| 394 | cli.BoolFlag{Name: "verbose, v", Usage: "Print logs for passing tests"}, |
| 395 | cli.StringFlag{Name: "config-file, c", Value: "", Usage: "Config file path"}, |
| 396 | cli.StringFlag{Name: "run-test, r", Value: "", Usage: "Run only tests matching specified regex"}, |
| 397 | cli.IntFlag{Name: "parallel, p", Value: runtime.NumCPU(), Usage: "Allow parallel execution of test functions"}, |
| 398 | cli.StringFlag{Name: "type, t", Value: "", Usage: "Run only specific types of tests from a comma separated list (js,go); if not specified, all types of tests are run"}, |
| 399 | }, |
| 400 | Action: framework.TestExtensions, |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | func getMigrateSubcommand(subcmd, usage string) cli.Command { |
| 405 | return cli.Command{ |