diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /app/controllers/projects/pipelines | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/controllers/projects/pipelines')
-rw-r--r-- | app/controllers/projects/pipelines/tests_controller.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/controllers/projects/pipelines/tests_controller.rb b/app/controllers/projects/pipelines/tests_controller.rb index 602fc02686a..4daf700a8bd 100644 --- a/app/controllers/projects/pipelines/tests_controller.rb +++ b/app/controllers/projects/pipelines/tests_controller.rb @@ -3,6 +3,8 @@ module Projects module Pipelines class TestsController < Projects::Pipelines::ApplicationController + urgency :low, [:show, :summary] + before_action :authorize_read_build! before_action :builds, only: [:show] @@ -21,9 +23,13 @@ module Projects def show respond_to do |format| format.json do - render json: TestSuiteSerializer - .new(project: project, current_user: @current_user) - .represent(test_suite, details: true) + if Feature.enabled?(:ci_test_report_artifacts_expired, project, default_enabled: :yaml) && pipeline.has_expired_test_reports? + render json: { errors: 'Test report artifacts have expired' }, status: :not_found + else + render json: TestSuiteSerializer + .new(project: project, current_user: @current_user) + .represent(test_suite, details: true) + end end end end |