mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-12 10:55:20 +02:00
fix(cxone): fix test cases (#4564)
Co-authored-by: thtri <thanh.hai.trinh@sap.com>
This commit is contained in:
parent
1704758563
commit
4de0e3e0f3
@ -75,13 +75,20 @@ func TestCreateJSONReport(t *testing.T) {
|
||||
assert.Equal(t, "Incremental", reportingData.ScanType)
|
||||
|
||||
lowList := (*reportingData.Findings)[2].LowPerQuery
|
||||
assert.Equal(t, 2, len(*lowList))
|
||||
assert.Equal(t, "Low_Query_Name_1", (*lowList)[0].QueryName)
|
||||
assert.Equal(t, 0, (*lowList)[0].Audited)
|
||||
assert.Equal(t, 4, (*lowList)[0].Total)
|
||||
assert.Equal(t, "Low_Query_Name_2", (*lowList)[1].QueryName)
|
||||
assert.Equal(t, 5, (*lowList)[1].Audited)
|
||||
assert.Equal(t, 5, (*lowList)[1].Total)
|
||||
lowListLen := len(*lowList)
|
||||
assert.Equal(t, 2, lowListLen)
|
||||
|
||||
for i := 0; i < lowListLen; i++ {
|
||||
if (*lowList)[i].QueryName == "Low_Query_Name_1" {
|
||||
assert.Equal(t, 0, (*lowList)[i].Audited)
|
||||
assert.Equal(t, 4, (*lowList)[i].Total)
|
||||
}
|
||||
|
||||
if (*lowList)[i].QueryName == "Low_Query_Name_2" {
|
||||
assert.Equal(t, 5, (*lowList)[i].Audited)
|
||||
assert.Equal(t, 5, (*lowList)[i].Total)
|
||||
}
|
||||
}
|
||||
|
||||
lowPerQuery = map[string]map[string]int{}
|
||||
submap = map[string]int{}
|
||||
|
Loading…
Reference in New Issue
Block a user