debian-mirror-gitlab/app/serializers/test_report_entity.rb
2023-01-13 15:02:22 +05:30

15 lines
631 B
Ruby

# frozen_string_literal: true
class TestReportEntity < Grape::Entity
expose :total_time, documentation: { type: 'integer', example: 180 }
expose :total_count, documentation: { type: 'integer', example: 1 }
expose :success_count, documentation: { type: 'integer', example: 1 }
expose :failed_count, documentation: { type: 'integer', example: 0 }
expose :skipped_count, documentation: { type: 'integer', example: 0 }
expose :error_count, documentation: { type: 'integer', example: 0 }
expose :test_suites, using: TestSuiteEntity, documentation: { is_array: true } do |report|
report.test_suites.values
end
end