mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-28 19:47:14 +08:00
refactor: move LoadFile to hrp/loader
This commit is contained in:
+2
-2
@@ -27,7 +27,7 @@ type TestCasePath string
|
||||
func (path *TestCasePath) GetTestCase() (*TestCase, error) {
|
||||
tc := &TestCase{}
|
||||
casePath := string(*path)
|
||||
err := builtin.LoadFile(casePath, tc)
|
||||
err := LoadFile(casePath, tc)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -137,7 +137,7 @@ func (tc *TestCase) loadISteps() (*TestCase, error) {
|
||||
dotEnvPath := filepath.Join(projectRootDir, ".env")
|
||||
if builtin.IsFilePathExists(dotEnvPath) {
|
||||
envVars := make(map[string]string)
|
||||
err = builtin.LoadFile(dotEnvPath, envVars)
|
||||
err = LoadFile(dotEnvPath, envVars)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to load .env file")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user