Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
1eeef229aa
commit
42f41de465
|
@ -217,13 +217,11 @@ Gitlab/DuplicateSpecLocation:
|
||||||
- ee/spec/helpers/auth_helper_spec.rb
|
- ee/spec/helpers/auth_helper_spec.rb
|
||||||
- ee/spec/lib/gitlab/gl_repository_spec.rb
|
- ee/spec/lib/gitlab/gl_repository_spec.rb
|
||||||
- ee/spec/models/namespace_spec.rb
|
- ee/spec/models/namespace_spec.rb
|
||||||
- ee/spec/services/issues/create_service_spec.rb
|
|
||||||
- ee/spec/services/merge_requests/create_service_spec.rb
|
- ee/spec/services/merge_requests/create_service_spec.rb
|
||||||
- ee/spec/services/merge_requests/refresh_service_spec.rb
|
- ee/spec/services/merge_requests/refresh_service_spec.rb
|
||||||
- ee/spec/services/merge_requests/update_service_spec.rb
|
- ee/spec/services/merge_requests/update_service_spec.rb
|
||||||
- ee/spec/helpers/ee/auth_helper_spec.rb
|
- ee/spec/helpers/ee/auth_helper_spec.rb
|
||||||
- ee/spec/models/ee/namespace_spec.rb
|
- ee/spec/models/ee/namespace_spec.rb
|
||||||
- ee/spec/services/ee/issues/create_service_spec.rb
|
|
||||||
- ee/spec/services/ee/merge_requests/create_service_spec.rb
|
- ee/spec/services/ee/merge_requests/create_service_spec.rb
|
||||||
- ee/spec/services/ee/merge_requests/refresh_service_spec.rb
|
- ee/spec/services/ee/merge_requests/refresh_service_spec.rb
|
||||||
- ee/spec/services/ee/merge_requests/update_service_spec.rb
|
- ee/spec/services/ee/merge_requests/update_service_spec.rb
|
||||||
|
|
|
@ -172,9 +172,15 @@ class Projects::PipelinesController < Projects::ApplicationController
|
||||||
if pipeline_test_report == :error
|
if pipeline_test_report == :error
|
||||||
render json: { status: :error_parsing_report }
|
render json: { status: :error_parsing_report }
|
||||||
else
|
else
|
||||||
|
test_reports = if params[:scope] == "with_attachment"
|
||||||
|
pipeline_test_report.with_attachment!
|
||||||
|
else
|
||||||
|
pipeline_test_report
|
||||||
|
end
|
||||||
|
|
||||||
render json: TestReportSerializer
|
render json: TestReportSerializer
|
||||||
.new(current_user: @current_user)
|
.new(current_user: @current_user)
|
||||||
.represent(pipeline_test_report)
|
.represent(test_reports)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
.save-project-loader
|
.save-project-loader
|
||||||
.center
|
.center
|
||||||
%h2
|
%h2
|
||||||
%i.fa.fa-spinner.fa-spin
|
%i.loading.spinner.spinner-sm
|
||||||
= import_in_progress_title
|
= import_in_progress_title
|
||||||
- if !has_ci_cd_only_params? && @project.external_import?
|
- if !has_ci_cd_only_params? && @project.external_import?
|
||||||
%p.monospace git clone --bare #{@project.safe_import_url}
|
%p.monospace git clone --bare #{@project.safe_import_url}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Include LDAP UID attribute in default attributes for all LDAP lookups
|
||||||
|
merge_request: 28148
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Fix name of approvals column in merge requests
|
||||||
|
merge_request: 28274
|
||||||
|
author: Steffen Köhler
|
||||||
|
type: fixed
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Updated spinner next to forking message
|
||||||
|
merge_request: 28506
|
||||||
|
author: Victor Wu
|
||||||
|
type: other
|
|
@ -178,7 +178,7 @@ module Gitlab
|
||||||
|
|
||||||
def default_attributes
|
def default_attributes
|
||||||
{
|
{
|
||||||
'username' => %w(uid sAMAccountName userid),
|
'username' => %W(#{uid} uid sAMAccountName userid).uniq,
|
||||||
'email' => %w(mail email userPrincipalName),
|
'email' => %w(mail email userPrincipalName),
|
||||||
'name' => 'cn',
|
'name' => 'cn',
|
||||||
'first_name' => 'givenName',
|
'first_name' => 'givenName',
|
||||||
|
|
|
@ -12185,15 +12185,15 @@ msgstr ""
|
||||||
msgid "MR widget|The pipeline will now run automatically every time you commit code. Pipelines are useful for deploying static web pages, detecting vulnerabilities in dependencies, static or dynamic application security testing (SAST and DAST), and so much more!"
|
msgid "MR widget|The pipeline will now run automatically every time you commit code. Pipelines are useful for deploying static web pages, detecting vulnerabilities in dependencies, static or dynamic application security testing (SAST and DAST), and so much more!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "MRApprovals|Approvals"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "MRApprovals|Approved by"
|
msgid "MRApprovals|Approved by"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "MRApprovals|Approvers"
|
msgid "MRApprovals|Approvers"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "MRApprovals|Pending approvals"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "MRDiff|Show changes only"
|
msgid "MRDiff|Show changes only"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -788,6 +788,28 @@ describe Projects::PipelinesController do
|
||||||
expect(json_response['status']).to eq('error_parsing_report')
|
expect(json_response['status']).to eq('error_parsing_report')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when test_report contains attachment and scope is with_attachment as a URL param' do
|
||||||
|
let(:pipeline) { create(:ci_pipeline, :with_test_reports_attachment, project: project) }
|
||||||
|
|
||||||
|
it 'returns a test reports with attachment' do
|
||||||
|
get_test_report_json(scope: 'with_attachment')
|
||||||
|
|
||||||
|
expect(response).to have_gitlab_http_status(:ok)
|
||||||
|
expect(json_response["test_suites"]).to be_present
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when test_report does not contain attachment and scope is with_attachment as a URL param' do
|
||||||
|
let(:pipeline) { create(:ci_pipeline, :with_test_reports, project: project) }
|
||||||
|
|
||||||
|
it 'returns a test reports with empty values' do
|
||||||
|
get_test_report_json(scope: 'with_attachment')
|
||||||
|
|
||||||
|
expect(response).to have_gitlab_http_status(:ok)
|
||||||
|
expect(json_response["test_suites"]).to be_empty
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when feature is disabled' do
|
context 'when feature is disabled' do
|
||||||
|
@ -805,12 +827,17 @@ describe Projects::PipelinesController do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_test_report_json
|
def get_test_report_json(**args)
|
||||||
get :test_report, params: {
|
params = {
|
||||||
namespace_id: project.namespace,
|
namespace_id: project.namespace,
|
||||||
project_id: project,
|
project_id: project,
|
||||||
id: pipeline.id
|
id: pipeline.id
|
||||||
},
|
}
|
||||||
|
|
||||||
|
params.merge!(args) if args
|
||||||
|
|
||||||
|
get :test_report,
|
||||||
|
params: params,
|
||||||
format: :json
|
format: :json
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -311,6 +311,12 @@ FactoryBot.define do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
trait :test_reports_with_attachment do
|
||||||
|
after(:build) do |build|
|
||||||
|
build.job_artifacts << create(:ci_job_artifact, :junit_with_attachment, job: build)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
trait :coverage_reports do
|
trait :coverage_reports do
|
||||||
after(:build) do |build|
|
after(:build) do |build|
|
||||||
build.job_artifacts << create(:ci_job_artifact, :cobertura, job: build)
|
build.job_artifacts << create(:ci_job_artifact, :cobertura, job: build)
|
||||||
|
|
|
@ -99,6 +99,16 @@ FactoryBot.define do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
trait :junit_with_attachment do
|
||||||
|
file_type { :junit }
|
||||||
|
file_format { :gzip }
|
||||||
|
|
||||||
|
after(:build) do |artifact, evaluator|
|
||||||
|
artifact.file = fixture_file_upload(
|
||||||
|
Rails.root.join('spec/fixtures/junit/junit_with_attachment.xml.gz'), 'application/x-gzip')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
trait :junit_with_ant do
|
trait :junit_with_ant do
|
||||||
file_type { :junit }
|
file_type { :junit }
|
||||||
file_format { :gzip }
|
file_format { :gzip }
|
||||||
|
|
|
@ -67,6 +67,14 @@ FactoryBot.define do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
trait :with_test_reports_attachment do
|
||||||
|
status { :success }
|
||||||
|
|
||||||
|
after(:build) do |pipeline, evaluator|
|
||||||
|
pipeline.builds << build(:ci_build, :test_reports_with_attachment, pipeline: pipeline, project: pipeline.project)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
trait :with_coverage_reports do
|
trait :with_coverage_reports do
|
||||||
status { :success }
|
status { :success }
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -502,6 +502,20 @@ AtlErSqafbECNDSwS5BX8yDpu5yRBJ4xegO/rNlmb8ICRYkuJapD1xXicFOsmfUK
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#default_attributes' do
|
||||||
|
it 'includes the configured uid attribute in the username attributes' do
|
||||||
|
stub_ldap_config(options: { 'uid' => 'my_uid_attr' })
|
||||||
|
|
||||||
|
expect(config.default_attributes['username']).to include('my_uid_attr')
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'only includes unique values for username attributes' do
|
||||||
|
stub_ldap_config(options: { 'uid' => 'uid' })
|
||||||
|
|
||||||
|
expect(config.default_attributes['username']).to contain_exactly('uid', 'sAMAccountName', 'userid')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#base' do
|
describe '#base' do
|
||||||
context 'when the configured base is not normalized' do
|
context 'when the configured base is not normalized' do
|
||||||
it 'returns the normalized base' do
|
it 'returns the normalized base' do
|
||||||
|
|
Loading…
Reference in New Issue