Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
易企天创
zentaoatf
提交
f9149c02
Z
zentaoatf
项目概览
易企天创
/
zentaoatf
12 个月 前同步成功
通知
11
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
3
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
zentaoatf
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
3
Issue
3
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f9149c02
编写于
2月 20, 2023
作者:
雨
雨爱无痕
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'main' of
https://github.com/easysoft/zentaoatf
上级
a3239090
ef2a73f0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
12 deletion
+15
-12
internal/pkg/helper/zentao/bug.go
internal/pkg/helper/zentao/bug.go
+4
-4
internal/pkg/helper/zentao/case.go
internal/pkg/helper/zentao/case.go
+5
-4
internal/pkg/helper/zentao/product.go
internal/pkg/helper/zentao/product.go
+5
-3
internal/server/modules/v1/controller/test-script.go
internal/server/modules/v1/controller/test-script.go
+1
-1
未找到文件。
internal/pkg/helper/zentao/bug.go
浏览文件 @
f9149c02
...
...
@@ -270,10 +270,10 @@ func LoadBugs(Product int, config commDomain.WorkspaceConf) (bugs []commDomain.Z
for
_
,
item
:=
range
items
{
bug
,
_
:=
item
.
(
map
[
string
]
interface
{})
id
,
_
:=
bug
[
"id"
]
.
(
json
.
Number
)
.
Int64
(
)
caseId
,
_
:=
bug
[
"case"
]
.
(
json
.
Number
)
.
Int64
(
)
severity
,
_
:=
bug
[
"severity"
]
.
(
json
.
Number
)
.
Int64
(
)
pri
,
_
:=
bug
[
"pri"
]
.
(
json
.
Number
)
.
Int64
(
)
id
,
_
:=
strconv
.
ParseInt
(
fmt
.
Sprintf
(
"%v"
,
bug
[
"id"
]),
10
,
64
)
caseId
,
_
:=
strconv
.
ParseInt
(
fmt
.
Sprintf
(
"%v"
,
bug
[
"case"
]),
10
,
64
)
severity
,
_
:=
strconv
.
ParseInt
(
fmt
.
Sprintf
(
"%v"
,
bug
[
"severity"
]),
10
,
64
)
pri
,
_
:=
strconv
.
ParseInt
(
fmt
.
Sprintf
(
"%v"
,
bug
[
"pri"
]),
10
,
64
)
title
,
_
:=
bug
[
"title"
]
.
(
string
)
openedBy
,
_
:=
bug
[
"openedBy"
]
.
(
map
[
string
]
interface
{})
bugs
=
append
(
bugs
,
commDomain
.
ZentaoBug
{
...
...
internal/pkg/helper/zentao/case.go
浏览文件 @
f9149c02
...
...
@@ -3,11 +3,12 @@ package zentaoHelper
import
(
"encoding/json"
"fmt"
"github.com/fatih/color"
"sort"
"strconv"
"strings"
"github.com/fatih/color"
"github.com/bitly/go-simplejson"
commConsts
"github.com/easysoft/zentaoatf/internal/pkg/consts"
commDomain
"github.com/easysoft/zentaoatf/internal/pkg/domain"
...
...
@@ -334,7 +335,7 @@ func GetCaseIdsInZentaoModule(productId, moduleId uint, config commDomain.Worksp
caseIdMap
=
map
[
int
]
string
{}
for
_
,
item
:=
range
items
{
mp
,
_
:=
item
.
(
map
[
string
]
interface
{})
id
,
_
:=
mp
[
"id"
]
.
(
json
.
Number
)
.
Int64
(
)
id
,
_
:=
strconv
.
ParseInt
(
fmt
.
Sprintf
(
"%v"
,
mp
[
"id"
]),
10
,
64
)
caseIdMap
[
int
(
id
)]
=
""
}
...
...
@@ -373,7 +374,7 @@ func GetCaseIdsInZentaoSuite(productId uint, suiteId int, config commDomain.Work
caseIdMap
=
map
[
int
]
string
{}
for
_
,
item
:=
range
items
{
mp
,
_
:=
item
.
(
map
[
string
]
interface
{})
id
,
_
:=
mp
[
"id"
]
.
(
json
.
Number
)
.
Int64
(
)
id
,
_
:=
strconv
.
ParseInt
(
fmt
.
Sprintf
(
"%v"
,
mp
[
"id"
]),
10
,
64
)
caseIdMap
[
int
(
id
)]
=
""
}
...
...
@@ -412,7 +413,7 @@ func GetCaseIdsInZentaoTask(productId uint, taskId int, config commDomain.Worksp
caseIdMap
=
map
[
int
]
string
{}
for
_
,
item
:=
range
items
{
mp
,
_
:=
item
.
(
map
[
string
]
interface
{})
id
,
_
:=
mp
[
"case"
]
.
(
json
.
Number
)
.
Int64
(
)
id
,
_
:=
strconv
.
ParseInt
(
fmt
.
Sprintf
(
"%v"
,
mp
[
"case"
]),
10
,
64
)
caseIdMap
[
int
(
id
)]
=
""
}
...
...
internal/pkg/helper/zentao/product.go
浏览文件 @
f9149c02
...
...
@@ -4,6 +4,9 @@ import (
"encoding/json"
"errors"
"fmt"
"path"
"strconv"
"github.com/bitly/go-simplejson"
commConsts
"github.com/easysoft/zentaoatf/internal/pkg/consts"
commDomain
"github.com/easysoft/zentaoatf/internal/pkg/domain"
...
...
@@ -13,7 +16,6 @@ import (
"github.com/easysoft/zentaoatf/pkg/domain"
httpUtils
"github.com/easysoft/zentaoatf/pkg/lib/http"
i118Utils
"github.com/easysoft/zentaoatf/pkg/lib/i118"
"path"
)
func
LoadSiteProduct
(
currSite
serverDomain
.
ZentaoSite
,
currProductId
int
)
(
...
...
@@ -90,7 +92,7 @@ func loadProduct(config commDomain.WorkspaceConf) (products []serverDomain.Zenta
for
_
,
item
:=
range
items
{
productMap
,
_
:=
item
.
(
map
[
string
]
interface
{})
id
,
_
:=
productMap
[
"id"
]
.
(
json
.
Number
)
.
Int64
(
)
id
,
_
:=
strconv
.
ParseInt
(
fmt
.
Sprintf
(
"%v"
,
productMap
[
"id"
]),
10
,
64
)
name
,
_
:=
productMap
[
"name"
]
.
(
string
)
products
=
append
(
products
,
serverDomain
.
ZentaoProduct
{
Id
:
int
(
id
),
Name
:
name
})
...
...
@@ -254,7 +256,7 @@ func LoadTask(productId uint, config commDomain.WorkspaceConf) (tasks []domain.N
func
GenPlatItems
(
arr
[]
interface
{})
(
ret
[]
domain
.
NestedItem
,
err
error
)
{
for
_
,
iterf
:=
range
arr
{
temp
:=
iterf
.
(
map
[
string
]
interface
{})
id64
,
_
:=
temp
[
"id"
]
.
(
json
.
Number
)
.
Int64
(
)
id64
,
_
:=
strconv
.
ParseInt
(
fmt
.
Sprintf
(
"%v"
,
temp
[
"id"
]),
10
,
64
)
item
:=
domain
.
NestedItem
{
Id
:
int
(
id64
),
Name
:
temp
[
"name"
]
.
(
string
)}
ret
=
append
(
ret
,
item
)
...
...
internal/server/modules/v1/controller/test-script.go
浏览文件 @
f9149c02
...
...
@@ -270,7 +270,7 @@ func (c *TestScriptCtrl) SyncToZentao(ctx iris.Context) {
for
_
,
set
:=
range
sets
{
totalNum
+=
len
(
set
.
Cases
)
count
,
_
:=
zentaoHelper
.
CheckIn
(
set
.
Cases
,
config
,
true
,
fals
e
)
count
,
_
:=
zentaoHelper
.
CheckIn
(
set
.
Cases
,
config
,
true
,
tru
e
)
successNum
+=
count
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录