diff --git a/reporthandling/results/v1/reportsummary/controlsummarymethods.go b/reporthandling/results/v1/reportsummary/controlsummarymethods.go index d3f04902..8415c717 100644 --- a/reporthandling/results/v1/reportsummary/controlsummarymethods.go +++ b/reporthandling/results/v1/reportsummary/controlsummarymethods.go @@ -90,7 +90,7 @@ func (controlSummary *ControlSummary) NumberOfResources() ICounters { } // NumberOfResources get the status counters -func (controlSummary *ControlSummary) ResourcesCounters() (ICounters, ISubCounters) { +func (controlSummary *ControlSummary) StatusesCounters() (ICounters, ISubCounters) { return &controlSummary.StatusCounters, &controlSummary.SubStatusCounters } diff --git a/reporthandling/results/v1/reportsummary/datastructures.go b/reporthandling/results/v1/reportsummary/datastructures.go index a7fb1845..a1a18ea5 100644 --- a/reporthandling/results/v1/reportsummary/datastructures.go +++ b/reporthandling/results/v1/reportsummary/datastructures.go @@ -46,7 +46,6 @@ type ControlSummary struct { SubStatusCounters SubStatusCounters `json:",inline"` Score float32 `json:"score"` ScoreFactor float32 `json:"scoreFactor"` - // SubStatus apis.ScanningSubStatus `json:"subStatus"` } type StatusCounters struct { diff --git a/reporthandling/results/v1/reportsummary/interface.go b/reporthandling/results/v1/reportsummary/interface.go index 037f1daf..498d41d1 100644 --- a/reporthandling/results/v1/reportsummary/interface.go +++ b/reporthandling/results/v1/reportsummary/interface.go @@ -46,7 +46,7 @@ type IControlSummary interface { // Get SubStatus() get control sub status GetSubStatus() apis.ScanningSubStatus - ResourcesCounters() (ICounters, ISubCounters) + StatusesCounters() (ICounters, ISubCounters) } type IControlsSummaries interface { diff --git a/reporthandling/results/v1/reportsummary/resourcecounters.go b/reporthandling/results/v1/reportsummary/statuscounters.go similarity index 100% rename from reporthandling/results/v1/reportsummary/resourcecounters.go rename to reporthandling/results/v1/reportsummary/statuscounters.go diff --git a/reporthandling/results/v1/reportsummary/resourcecounters_test.go b/reporthandling/results/v1/reportsummary/statuscounters_test.go similarity index 100% rename from reporthandling/results/v1/reportsummary/resourcecounters_test.go rename to reporthandling/results/v1/reportsummary/statuscounters_test.go diff --git a/reporthandling/results/v1/reportsummary/summarydetails_test.go b/reporthandling/results/v1/reportsummary/summarydetails_test.go index 0abd94f5..b0074077 100644 --- a/reporthandling/results/v1/reportsummary/summarydetails_test.go +++ b/reporthandling/results/v1/reportsummary/summarydetails_test.go @@ -68,7 +68,7 @@ func TestUpdateControlsSummaryCountersFailed(t *testing.T) { } for _, v := range controls { - statuses, subStatuses := v.ResourcesCounters() + statuses, subStatuses := v.StatusesCounters() assert.Equal(t, 1, statuses.All()) assert.Equal(t, 1, statuses.Failed()) assert.Equal(t, 0, statuses.Passed()) @@ -89,7 +89,7 @@ func TestUpdateControlsSummaryCountersExcluded(t *testing.T) { updateControlsSummaryCounters(&mockResultsException, controls, nil) for _, v := range controls { - statuses, subStatuses := v.ResourcesCounters() + statuses, subStatuses := v.StatusesCounters() assert.Equal(t, 1, statuses.All()) assert.Equal(t, 0, statuses.Failed()) assert.Equal(t, 1, statuses.Passed())