@@ -132,10 +132,10 @@ groups:
132132 controls .RunChecks (normalRunner , allChecks , skipMap )
133133
134134 G1 := controls .Groups [0 ]
135- assertEqualGroupSummary (t , 0 , 0 , 3 , 0 , G1 )
135+ assertEqualGroupSummary (t , 0 , 0 , 0 , 0 , 3 , 0 , 0 , G1 )
136136
137137 G2 := controls .Groups [1 ]
138- assertEqualGroupSummary (t , 0 , 0 , 2 , 0 , G2 )
138+ assertEqualGroupSummary (t , 0 , 0 , 0 , 0 , 2 , 0 , 0 , G2 )
139139 })
140140}
141141
@@ -163,7 +163,7 @@ groups:
163163 controls .RunChecks (normalRunner , allChecks , emptySkipList )
164164
165165 G1 := controls .Groups [0 ]
166- assertEqualGroupSummary (t , 0 , 0 , 1 , 0 , G1 )
166+ assertEqualGroupSummary (t , 0 , 0 , 0 , 0 , 1 , 0 , 0 , G1 )
167167 })
168168}
169169
@@ -214,7 +214,7 @@ groups:
214214 G1 := controls .Groups [0 ]
215215 assert .Equal (t , "G1" , G1 .ID )
216216 assert .Equal (t , "G1/C1" , G1 .Checks [0 ].ID )
217- assertEqualGroupSummary (t , 1 , 0 , 0 , 0 , G1 )
217+ assertEqualGroupSummary (t , 1 , 0 , 0 , 0 , 0 , 0 , 0 , G1 )
218218 // and
219219 G2 := controls .Groups [1 ]
220220 assert .Equal (t , "G2" , G2 .ID )
@@ -225,12 +225,15 @@ groups:
225225 assert .Equal (t , "SomeSampleFlag=true" , G2 .Checks [0 ].Tests .TestItems [0 ].Flag )
226226 assert .Equal (t , "Edit the config file /this/is/a/file/path and set SomeSampleFlag to true.\n " , G2 .Checks [0 ].Remediation )
227227 assert .Equal (t , true , G2 .Checks [0 ].Scored )
228- assertEqualGroupSummary (t , 0 , 1 , 0 , 0 , G2 )
228+ assertEqualGroupSummary (t , 0 , 1 , 0 , 0 , 0 , 0 , 0 , G2 )
229229 // and
230230 assert .Equal (t , 1 , controls .Summary .Pass )
231231 assert .Equal (t , 1 , controls .Summary .Fail )
232232 assert .Equal (t , 0 , controls .Summary .Info )
233233 assert .Equal (t , 0 , controls .Summary .Warn )
234+ assert .Equal (t , 0 , controls .Summary .Skip )
235+ assert .Equal (t , 0 , controls .Summary .Manu )
236+ assert .Equal (t , 0 , controls .Summary .Erro )
234237 // and
235238 runner .AssertExpectations (t )
236239 })
@@ -267,6 +270,9 @@ func TestControls_JUnitIncludesJSON(t *testing.T) {
267270 Pass : 100 ,
268271 Warn : 101 ,
269272 Info : 102 ,
273+ Skip : 0 ,
274+ Manu : 0 ,
275+ Erro : 0 ,
270276 },
271277 Groups : []* Group {
272278 {
@@ -283,7 +289,7 @@ func TestControls_JUnitIncludesJSON(t *testing.T) {
283289 </testcase>
284290</testsuite>` ),
285291 }, {
286- desc : "Warn and Info are considered skips and failed tests properly reported" ,
292+ desc : "WARN, INFO, SKIP, MANU are considered skips and failed tests properly reported" ,
287293 input : & Controls {
288294 Groups : []* Group {
289295 {
@@ -293,6 +299,9 @@ func TestControls_JUnitIncludesJSON(t *testing.T) {
293299 {ID : "check2id" , Text : "check2text" , State : INFO },
294300 {ID : "check3id" , Text : "check3text" , State : WARN },
295301 {ID : "check4id" , Text : "check4text" , State : FAIL },
302+ {ID : "check5id" , Text : "check5text" , State : SKIP },
303+ {ID : "check6id" , Text : "check6text" , State : MANU },
304+ {ID : "check7id" , Text : "check7text" , State : ERRO },
296305 },
297306 },
298307 },
@@ -313,6 +322,18 @@ func TestControls_JUnitIncludesJSON(t *testing.T) {
313322 <failure type=""></failure>
314323 <system-out>{"test_number":"check4id","test_desc":"check4text","audit":"","AuditEnv":"","AuditConfig":"","type":"","remediation":"","test_info":null,"status":"FAIL","actual_value":"","scored":false,"IsMultiple":false,"expected_result":""}</system-out>
315324 </testcase>
325+ <testcase name="check5id check5text" classname="" time="0">
326+ <skipped></skipped>
327+ <system-out>{"test_number":"check5id","test_desc":"check5text","audit":"","AuditEnv":"","AuditConfig":"","type":"","remediation":"","test_info":null,"status":"SKIP","actual_value":"","scored":false,"IsMultiple":false,"expected_result":""}</system-out>
328+ </testcase>
329+ <testcase name="check6id check6text" classname="" time="0">
330+ <skipped></skipped>
331+ <system-out>{"test_number":"check6id","test_desc":"check6text","audit":"","AuditEnv":"","AuditConfig":"","type":"","remediation":"","test_info":null,"status":"MANU","actual_value":"","scored":false,"IsMultiple":false,"expected_result":""}</system-out>
332+ </testcase>
333+ <testcase name="check7id check7text" classname="" time="0">
334+ <failure type=""></failure>
335+ <system-out>{"test_number":"check7id","test_desc":"check7text","audit":"","AuditEnv":"","AuditConfig":"","type":"","remediation":"","test_info":null,"status":"ERRO","actual_value":"","scored":false,"IsMultiple":false,"expected_result":""}</system-out>
336+ </testcase>
316337</testsuite>` ),
317338 },
318339 }
@@ -355,12 +376,15 @@ func TestControls_JUnitIncludesJSON(t *testing.T) {
355376 }
356377}
357378
358- func assertEqualGroupSummary (t * testing.T , pass , fail , info , warn int , actual * Group ) {
379+ func assertEqualGroupSummary (t * testing.T , pass , fail , info , warn , skip , manu , erro int , actual * Group ) {
359380 t .Helper ()
360381 assert .Equal (t , pass , actual .Pass )
361382 assert .Equal (t , fail , actual .Fail )
362383 assert .Equal (t , info , actual .Info )
363384 assert .Equal (t , warn , actual .Warn )
385+ assert .Equal (t , skip , actual .Skip )
386+ assert .Equal (t , manu , actual .Manu )
387+ assert .Equal (t , erro , actual .Erro )
364388}
365389
366390func TestControls_ASFF (t * testing.T ) {
@@ -388,6 +412,9 @@ func TestControls_ASFF(t *testing.T) {
388412 Pass : 100 ,
389413 Warn : 101 ,
390414 Info : 102 ,
415+ Skip : 0 ,
416+ Manu : 0 ,
417+ Erro : 0 ,
391418 },
392419 Groups : []* Group {
393420 {
0 commit comments