Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/foreman_maintain/utils/report_condenser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module ReportCondenser
class << self
def condense_report(data)
result = {}
%w[advisor_on_prem_remediations_count rhel_ai_workload_host_count].each do |key|
%w[iop_remediations_count rhel_ai_workload_host_count].each do |key|
result[key] = data[key] || 0
end
result.merge!(aggregate_host_count(data))
Expand Down
4 changes: 2 additions & 2 deletions test/lib/utils/report_condenser_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ module ForemanMaintain
describe '#condense_report' do
it 'condenses the report' do
data = {
'advisor_on_prem_remediations_count' => 10,
'iop_remediations_count' => 10,
'rhel_ai_workload_host_count' => 20,
}
result = Utils::ReportCondenser.condense_report(data)
_(result['advisor_on_prem_remediations_count']).must_equal 10
_(result['iop_remediations_count']).must_equal 10
_(result['rhel_ai_workload_host_count']).must_equal 20
end
end
Expand Down
Loading