diff --git a/pkg/service/teststats/teststats_test.go b/pkg/service/teststats/teststats_test.go index da100173..969731c8 100644 --- a/pkg/service/teststats/teststats_test.go +++ b/pkg/service/teststats/teststats_test.go @@ -246,27 +246,29 @@ func TestProcStats_appendStatsToTestSuites(t *testing.T) { }{ {"Test appendStatsToTests", args{[]core.TestSuitePayload{ - {SuiteID: "testSuite1", StartTime: timeMap["tpast1"], EndTime: timeMap["tfuture1"]}, + {SuiteID: "testSuite1", StartTime: timeMap["tpast1"], EndTime: timeMap["tfuture1"], TotalTests: 0}, }, []*procfs.Stats{}}, - "[{SuiteID:testSuite1 SuiteName: ParentSuiteID: BlocklistSource: Blocklisted:false StartTime:2021-02-22 16:23:01 +0000 UTC EndTime:2021-02-22 16:23:01 +0000 UTC Duration:0 Status: Stats:[]}]", + "[{SuiteID:testSuite1 SuiteName: ParentSuiteID: BlocklistSource: Blocklisted:false StartTime:2021-02-22 16:23:01 +0000 UTC EndTime:2021-02-22 16:23:01 +0000 UTC Duration:0 Status: Stats:[] TotalTests:0}]", }, {"Test appendStatsToTests", args{[]core.TestSuitePayload{ { - SuiteID: "testSuite2", - StartTime: timeMap["tpast1"], - Duration: 100, - EndTime: timeMap["tfuture1"], - Stats: []core.TestProcessStats{}, + SuiteID: "testSuite2", + StartTime: timeMap["tpast1"], + Duration: 100, + EndTime: timeMap["tfuture1"], + Stats: []core.TestProcessStats{}, + TotalTests: 0, }, { - SuiteID: "testSuite3", - StartTime: timeMap["tpast2"], - Duration: 200, - EndTime: timeMap["tfuture2"], - Stats: []core.TestProcessStats{{Memory: 100, CPU: 25.4, Storage: 250, RecordTime: timeMap["tpast2"]}}, + SuiteID: "testSuite3", + StartTime: timeMap["tpast2"], + Duration: 200, + EndTime: timeMap["tfuture2"], + Stats: []core.TestProcessStats{{Memory: 100, CPU: 25.4, Storage: 250, RecordTime: timeMap["tpast2"]}}, + TotalTests: 0, }, }, []*procfs.Stats{ @@ -296,7 +298,7 @@ func TestProcStats_appendStatsToTestSuites(t *testing.T) { }, }, }, - "[{SuiteID:testSuite2 SuiteName: ParentSuiteID: BlocklistSource: Blocklisted:false StartTime:2021-02-22 16:23:01 +0000 UTC EndTime:2021-02-22 16:23:01.1 +0000 UTC Duration:100 Status: Stats:[{Memory:131 CPU:1.2 Storage:0 RecordTime:2021-02-22 16:23:01 +0000 UTC}]} {SuiteID:testSuite3 SuiteName: ParentSuiteID: BlocklistSource: Blocklisted:false StartTime:2021-02-22 16:22:05 +0000 UTC EndTime:2021-02-22 16:22:05.2 +0000 UTC Duration:200 Status: Stats:[{Memory:100 CPU:25.4 Storage:250 RecordTime:2021-02-22 16:22:05 +0000 UTC}]}]", + "[{SuiteID:testSuite2 SuiteName: ParentSuiteID: BlocklistSource: Blocklisted:false StartTime:2021-02-22 16:23:01 +0000 UTC EndTime:2021-02-22 16:23:01.1 +0000 UTC Duration:100 Status: Stats:[{Memory:131 CPU:1.2 Storage:0 RecordTime:2021-02-22 16:23:01 +0000 UTC}] TotalTests:0} {SuiteID:testSuite3 SuiteName: ParentSuiteID: BlocklistSource: Blocklisted:false StartTime:2021-02-22 16:22:05 +0000 UTC EndTime:2021-02-22 16:22:05.2 +0000 UTC Duration:200 Status: Stats:[{Memory:100 CPU:25.4 Storage:250 RecordTime:2021-02-22 16:22:05 +0000 UTC}] TotalTests:0}]", }, } for _, tt := range tests {