diff --git a/.gitignore b/.gitignore index d5913c0cc9e69b05874bb551a8161c858b8d065f..d6b3be8b34e65533710651417b3367d24c61b770 100644 --- a/.gitignore +++ b/.gitignore @@ -76,3 +76,5 @@ test/cli/docker/ cmd/test/restapi/allure-results/ cmd/test/restapi/result.json cmd/test/restapi/result.zip +cmd/test/result.json +cmd/test/result.zip diff --git a/internal/pkg/helper/exec/unit.go b/internal/pkg/helper/exec/unit.go index ad09a949fd9abfe0f9c73b783bf25fb72e40a403..6a0894ae5a3e4d2ec51346bfd956a4f560517ff0 100644 --- a/internal/pkg/helper/exec/unit.go +++ b/internal/pkg/helper/exec/unit.go @@ -150,6 +150,7 @@ func printStdout(stdout io.ReadCloser, ch chan int, cmd *exec.Cmd, key string, w for { line, err3 := reader1.ReadString('\n') if line != "" { + line = stringUtils.Convert2Utf8IfNeeded(line) websocketHelper.SendOutputMsgIfNeed(line, "", iris.Map{"key": key}, wsMsg) logUtils.ExecConsole(1, line) logUtils.ExecFile(line) @@ -189,6 +190,7 @@ func printStderr(isTerminal bool, stderr io.ReadCloser, key string, wsMsg *webso if err2 != nil || io.EOF == err2 { break } + line = stringUtils.Convert2Utf8IfNeeded(line) errOutputArr = append(errOutputArr, line) } } diff --git a/internal/pkg/helper/zentao/bug.go b/internal/pkg/helper/zentao/bug.go index 475c7d6b13186ec2c952977cabbe254ae9f6339f..cda4c4d9c7dbc4aeef1feb8662ceee46d17d6da0 100644 --- a/internal/pkg/helper/zentao/bug.go +++ b/internal/pkg/helper/zentao/bug.go @@ -244,12 +244,7 @@ func GetBugFiledOptions(config commDomain.WorkspaceConf, productId int) ( return } - jsn, err := simplejson.NewJson(bytes) - if err != nil { - err = ZentaoRequestErr(url, commConsts.ResponseParseErr.Message) - return - } - fmt.Println(jsn) + bytes = []byte(strings.Replace(string(bytes), `"modules":["\/"]`, `"modules":{"0":"\/"}`, 1)) err = json.Unmarshal(bytes, &bugOptionsWrapper) if err != nil { err = ZentaoRequestErr(url, commConsts.ResponseParseErr.Message)