Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 21:42:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 21:42:06 +0300
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /app/controllers/projects/pipelines/tests_controller.rb
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/controllers/projects/pipelines/tests_controller.rb')
-rw-r--r--app/controllers/projects/pipelines/tests_controller.rb19
1 files changed, 5 insertions, 14 deletions
diff --git a/app/controllers/projects/pipelines/tests_controller.rb b/app/controllers/projects/pipelines/tests_controller.rb
index f03274bf32e..1c212964df5 100644
--- a/app/controllers/projects/pipelines/tests_controller.rb
+++ b/app/controllers/projects/pipelines/tests_controller.rb
@@ -3,7 +3,6 @@
module Projects
module Pipelines
class TestsController < Projects::Pipelines::ApplicationController
- before_action :validate_feature_flag!
before_action :authorize_read_build!
before_action :builds, only: [:show]
@@ -29,29 +28,21 @@ module Projects
private
- def validate_feature_flag!
- render_404 unless Feature.enabled?(:build_report_summary, project)
- end
-
# rubocop: disable CodeReuse/ActiveRecord
def builds
- pipeline.latest_builds.where(id: build_params)
+ @builds ||= pipeline.latest_builds.for_ids(build_ids).presence || render_404
end
- def build_params
+ def build_ids
return [] unless params[:build_ids]
params[:build_ids].split(",")
end
def test_suite
- if builds.present?
- builds.map do |build|
- build.collect_test_reports!(Gitlab::Ci::Reports::TestReports.new)
- end.sum
- else
- render_404
- end
+ builds.map do |build|
+ build.collect_test_reports!(Gitlab::Ci::Reports::TestReports.new)
+ end.sum
end
# rubocop: enable CodeReuse/ActiveRecord
end