debian-mirror-gitlab/app/serializers/test_report_entity.rb

16 lines
631 B
Ruby
Raw Normal View History

2019-12-21 20:55:43 +05:30
# frozen_string_literal: true
class TestReportEntity < Grape::Entity
2023-01-13 00:05:48 +05:30
expose :total_time, documentation: { type: 'integer', example: 180 }
expose :total_count, documentation: { type: 'integer', example: 1 }
2019-12-21 20:55:43 +05:30
2023-01-13 00:05:48 +05:30
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 }
2019-12-21 20:55:43 +05:30
2023-01-13 00:05:48 +05:30
expose :test_suites, using: TestSuiteEntity, documentation: { is_array: true } do |report|
2019-12-21 20:55:43 +05:30
report.test_suites.values
end
end