diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /app/serializers/test_suite_entity.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'app/serializers/test_suite_entity.rb')
-rw-r--r-- | app/serializers/test_suite_entity.rb | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/app/serializers/test_suite_entity.rb b/app/serializers/test_suite_entity.rb index 15eb2891b22..a31b1f3ab9b 100644 --- a/app/serializers/test_suite_entity.rb +++ b/app/serializers/test_suite_entity.rb @@ -1,18 +1,19 @@ # frozen_string_literal: true class TestSuiteEntity < Grape::Entity - expose :name - expose :total_time - expose :total_count + expose :name, documentation: { type: 'string', example: 'test' } + expose :total_time, documentation: { type: 'integer', example: 1904 } + expose :total_count, documentation: { type: 'integer', example: 3363 } - expose :success_count - expose :failed_count - expose :skipped_count - expose :error_count + expose :success_count, documentation: { type: 'integer', example: 3351 } + expose :failed_count, documentation: { type: 'integer', example: 0 } + expose :skipped_count, documentation: { type: 'integer', example: 12 } + expose :error_count, documentation: { type: 'integer', example: 0 } with_options if: -> (_, opts) { opts[:details] } do |test_suite| - expose :suite_error - expose :test_cases, using: TestCaseEntity do |test_suite| + expose :suite_error, + documentation: { type: 'string', example: 'JUnit XML parsing failed: 1:1: FATAL: Document is empty' } + expose :test_cases, using: TestCaseEntity, documentation: { is_array: true } do |test_suite| test_suite.suite_error ? [] : test_suite.sorted.test_cases.values.flat_map(&:values) end end |