diff options
Diffstat (limited to 'app/controllers/projects/pipelines/tests_controller.rb')
-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 |