mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
change: remove hrun command
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ var scaffoldCmd = &cobra.Command{
|
|||||||
},
|
},
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
if !ignorePlugin && !genPythonPlugin && !genGoPlugin {
|
if !ignorePlugin && !genPythonPlugin && !genGoPlugin {
|
||||||
return errors.New("please select function plugin type")
|
return errors.New("please specify function plugin type")
|
||||||
}
|
}
|
||||||
|
|
||||||
var pluginType scaffold.PluginType
|
var pluginType scaffold.PluginType
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ func (r *HRPRunner) Run(testcases ...ITestCase) error {
|
|||||||
// load all testcases
|
// load all testcases
|
||||||
testCases, err := loadTestCases(testcases...)
|
testCases, err := loadTestCases(testcases...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Error().Err(err).Msg("failed to load testcases")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,26 +108,6 @@ def main():
|
|||||||
main_make(args.testcase_path)
|
main_make(args.testcase_path)
|
||||||
|
|
||||||
|
|
||||||
def main_hrun_alias():
|
|
||||||
""" command alias
|
|
||||||
hrun = httprunner run
|
|
||||||
"""
|
|
||||||
if len(sys.argv) == 2:
|
|
||||||
if sys.argv[1] in ["-V", "--version"]:
|
|
||||||
# hrun -V
|
|
||||||
sys.argv = ["httprunner", "-V"]
|
|
||||||
elif sys.argv[1] in ["-h", "--help"]:
|
|
||||||
pytest.main(["-h"])
|
|
||||||
sys.exit(0)
|
|
||||||
else:
|
|
||||||
# hrun /path/to/testcase
|
|
||||||
sys.argv.insert(1, "run")
|
|
||||||
else:
|
|
||||||
sys.argv.insert(1, "run")
|
|
||||||
|
|
||||||
main()
|
|
||||||
|
|
||||||
|
|
||||||
def main_make_alias():
|
def main_make_alias():
|
||||||
""" command alias
|
""" command alias
|
||||||
hmake = httprunner make
|
hmake = httprunner make
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ coverage = "^4.5.4"
|
|||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
httprunner = "httprunner.cli:main"
|
httprunner = "httprunner.cli:main"
|
||||||
hrun = "httprunner.cli:main_hrun_alias"
|
|
||||||
hmake = "httprunner.cli:main_make_alias"
|
hmake = "httprunner.cli:main_make_alias"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
|||||||
Reference in New Issue
Block a user