Merge branch 'main' into chore/support-rich-interface-request-result-verification-mechanism

This commit is contained in:
徐聪
2021-12-29 15:02:35 +08:00
3 changed files with 8 additions and 22 deletions

View File

@@ -3,6 +3,7 @@ package builtin
import (
"crypto/md5"
"encoding/hex"
"github.com/httprunner/hrp"
"math"
"math/rand"
"time"
@@ -14,7 +15,8 @@ var Functions = map[string]interface{}{
"gen_random_string": genRandomString, // call with one argument
"max": math.Max, // call with two arguments
"md5": MD5,
"getAppVersion": getAppVersion, // test
"parameterize": hrp.LoadFromCSV,
"P": hrp.LoadFromCSV,
}
func init() {
@@ -45,7 +47,3 @@ func MD5(str string) string {
hasher.Write([]byte(str))
return hex.EncodeToString(hasher.Sum(nil))
}
func getAppVersion() []float64 {
return []float64{3.1, 3.3}
}