Skip to content
Snippets Groups Projects
Commit dee93158 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent d64e3a8b
No related branches found
No related tags found
No related merge requests found
Showing
with 166 additions and 60 deletions
Loading
Loading
@@ -16558,7 +16558,7 @@ msgstr ""
msgid "To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed."
msgstr "Для збереження швидкодії відображаються лише <strong>%{display_size} із %{real_size}</strong> файлів."
 
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visiblity to private."
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visibility to private."
msgstr ""
 
msgid "To protect this issue's confidentiality, a private fork of this project was selected."
Loading
Loading
Loading
Loading
@@ -16294,7 +16294,7 @@ msgstr ""
msgid "To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed."
msgstr ""
 
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visiblity to private."
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visibility to private."
msgstr ""
 
msgid "To protect this issue's confidentiality, a private fork of this project was selected."
Loading
Loading
Loading
Loading
@@ -16294,7 +16294,7 @@ msgstr "请将%{link} 页面连接到您的 Jaeger 服务器,以便在 GitLab
msgid "To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed."
msgstr "为了保持性能,仅显示文件中的 <strong>%{display_size}/%{real_size}</strong>。"
 
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visiblity to private."
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visibility to private."
msgstr ""
 
msgid "To protect this issue's confidentiality, a private fork of this project was selected."
Loading
Loading
Loading
Loading
@@ -16294,7 +16294,7 @@ msgstr ""
msgid "To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed."
msgstr ""
 
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visiblity to private."
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visibility to private."
msgstr ""
 
msgid "To protect this issue's confidentiality, a private fork of this project was selected."
Loading
Loading
Loading
Loading
@@ -16294,7 +16294,7 @@ msgstr ""
msgid "To preserve performance only <strong>%{display_size} of %{real_size}</strong> files are displayed."
msgstr ""
 
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visiblity to private."
msgid "To protect this issue's confidentiality, %{link_start}fork the project%{link_end} and set the forks visibility to private."
msgstr ""
 
msgid "To protect this issue's confidentiality, a private fork of this project was selected."
Loading
Loading
Loading
Loading
@@ -138,7 +138,7 @@ class AutomatedCleanup
 
releases_names = releases.map(&:name)
helm.delete(release_name: releases_names)
kubernetes.cleanup(release_name: releases_names)
kubernetes.cleanup(release_name: releases_names, wait: false)
 
rescue Quality::HelmClient::CommandFailedError => ex
raise ex unless ignore_exception?(ex.message, IGNORED_HELM_ERRORS)
Loading
Loading
Loading
Loading
@@ -136,7 +136,7 @@ describe "Compare", :js do
def select_using_dropdown(dropdown_type, selection, commit: false)
dropdown = find(".js-compare-#{dropdown_type}-dropdown")
dropdown.find(".compare-dropdown-toggle").click
# find input before using to wait for the inputs visiblity
# find input before using to wait for the inputs visibility
dropdown.find('.dropdown-menu')
dropdown.fill_in("Filter by Git revision", with: selection)
wait_for_requests
Loading
Loading
@@ -144,7 +144,7 @@ describe "Compare", :js do
if commit
dropdown.find('input[type="search"]').send_keys(:return)
else
# find before all to wait for the items visiblity
# find before all to wait for the items visibility
dropdown.find("a[data-ref=\"#{selection}\"]", match: :first)
dropdown.all("a[data-ref=\"#{selection}\"]").last.click
end
Loading
Loading
Loading
Loading
@@ -26,7 +26,7 @@ exports[`Confidential merge request project form group component renders empty s
>
fork the project
</a>
and set the forks visiblity to private.
and set the forks visibility to private.
</span>
<gllink-stub
Loading
Loading
@@ -76,7 +76,7 @@ exports[`Confidential merge request project form group component renders fork dr
>
fork the project
</a>
and set the forks visiblity to private.
and set the forks visibility to private.
</span>
<gllink-stub
Loading
Loading
Loading
Loading
@@ -178,13 +178,13 @@ describe('IDE clientside preview', () => {
});
 
describe('showOpenInCodeSandbox', () => {
it('returns true when visiblity is public', () => {
it('returns true when visibility is public', () => {
createComponent({ getters: { currentProject: () => ({ visibility: 'public' }) } });
 
expect(wrapper.vm.showOpenInCodeSandbox).toBe(true);
});
 
it('returns false when visiblity is private', () => {
it('returns false when visibility is private', () => {
createComponent({ getters: { currentProject: () => ({ visibility: 'private' }) } });
 
expect(wrapper.vm.showOpenInCodeSandbox).toBe(false);
Loading
Loading
Loading
Loading
@@ -20,6 +20,7 @@ describe Bitbucket::Representation::PullRequest do
describe '#state' do
it { expect(described_class.new({ 'state' => 'MERGED' }).state).to eq('merged') }
it { expect(described_class.new({ 'state' => 'DECLINED' }).state).to eq('closed') }
it { expect(described_class.new({ 'state' => 'SUPERSEDED' }).state).to eq('closed') }
it { expect(described_class.new({}).state).to eq('opened') }
end
 
Loading
Loading
Loading
Loading
@@ -23,7 +23,7 @@ describe Gitlab::Ci::Config::Entry::Job do
 
let(:result) do
%i[before_script script stage type after_script cache
image services only except rules variables artifacts
image services only except rules needs variables artifacts
environment coverage retry]
end
 
Loading
Loading
@@ -384,21 +384,6 @@ describe Gitlab::Ci::Config::Entry::Job do
end
 
context 'when has needs' do
context 'that are not a array of strings' do
let(:config) do
{
stage: 'test',
script: 'echo',
needs: 'build-job'
}
end
it 'returns error about invalid type' do
expect(entry).not_to be_valid
expect(entry.errors).to include 'job needs should be an array of strings'
end
end
context 'when have dependencies that are not subset of needs' do
let(:config) do
{
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
describe ::Gitlab::Ci::Config::Entry::Need do
subject(:need) { described_class.new(config) }
context 'when job is specified' do
let(:config) { 'job_name' }
describe '#valid?' do
it { is_expected.to be_valid }
end
describe '#value' do
it 'returns job needs configuration' do
expect(need.value).to eq(name: 'job_name')
end
end
end
context 'when need is empty' do
let(:config) { '' }
describe '#valid?' do
it { is_expected.not_to be_valid }
end
describe '#errors' do
it 'is returns an error about an empty config' do
expect(need.errors)
.to contain_exactly("job config can't be blank")
end
end
end
end
# frozen_string_literal: true
require 'spec_helper'
describe ::Gitlab::Ci::Config::Entry::Needs do
subject(:needs) { described_class.new(config) }
before do
needs.metadata[:allowed_needs] = %i[job]
end
describe 'validations' do
before do
needs.compose!
end
context 'when entry config value is correct' do
let(:config) { ['job_name'] }
describe '#valid?' do
it { is_expected.to be_valid }
end
end
context 'when config value has wrong type' do
let(:config) { 123 }
describe '#valid?' do
it { is_expected.not_to be_valid }
end
describe '#errors' do
it 'returns error about incorrect type' do
expect(needs.errors)
.to include('needs config can only be a hash or an array')
end
end
end
context 'when wrong needs type is used' do
let(:config) { [123] }
describe '#valid?' do
it { is_expected.not_to be_valid }
end
describe '#errors' do
it 'returns error about incorrect type' do
expect(needs.errors).to contain_exactly(
'need has an unsupported type')
end
end
end
end
describe '.compose!' do
context 'when valid job entries composed' do
let(:config) { %w[first_job_name second_job_name] }
before do
needs.compose!
end
describe '#value' do
it 'returns key value' do
expect(needs.value).to eq(
job: [
{ name: 'first_job_name' },
{ name: 'second_job_name' }
]
)
end
end
describe '#descendants' do
it 'creates valid descendant nodes' do
expect(needs.descendants.count).to eq 2
expect(needs.descendants)
.to all(be_an_instance_of(::Gitlab::Ci::Config::Entry::Need))
end
end
end
end
end
Loading
Loading
@@ -1253,7 +1253,7 @@ module Gitlab
end
end
 
describe "Needs" do
describe "Job Needs" do
let(:needs) { }
let(:dependencies) { }
 
Loading
Loading
@@ -1293,12 +1293,7 @@ module Gitlab
stage: "test",
stage_idx: 2,
name: "test1",
options: {
script: ["test"],
# This does not make sense, there is a follow-up:
# https://gitlab.com/gitlab-org/gitlab-foss/issues/65569
bridge_needs: %w[build1 build2]
},
options: { script: ["test"] },
needs_attributes: [
{ name: "build1" },
{ name: "build2" }
Loading
Loading
@@ -1310,12 +1305,6 @@ module Gitlab
end
end
 
context 'needs two builds defined as symbols' do
let(:needs) { [:build1, :build2] }
it { expect { subject }.not_to raise_error }
end
context 'undefined need' do
let(:needs) { ['undefined'] }
 
Loading
Loading
Loading
Loading
@@ -73,22 +73,10 @@ describe Gitlab::Experimentation do
end
 
describe 'URL parameter to force enable experiment' do
context 'is not present' do
# Disabled until https://gitlab.com/gitlab-org/gitlab/issues/34942 is solved properly
xit 'returns false' do
get :index, params: { force_experiment: :test_experiment2 }
it 'returns true' do
get :index, params: { force_experiment: :test_experiment }
 
expect(controller.experiment_enabled?(:test_experiment)).to be_falsey
end
end
context 'is present' do
# Disabled until https://gitlab.com/gitlab-org/gitlab/issues/34942 is solved properly
xit 'returns true' do
get :index, params: { force_experiment: :test_experiment }
expect(controller.experiment_enabled?(:test_experiment)).to be_truthy
end
expect(controller.experiment_enabled?(:test_experiment)).to be_truthy
end
end
end
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@ RSpec.describe Quality::KubernetesClient do
expect(Gitlab::Popen).to receive(:popen_with_detail)
.with([%(kubectl --namespace "#{namespace}" delete ) \
'ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa ' \
"--now --ignore-not-found --include-uninitialized -l release=\"#{release_name}\""])
"--now --ignore-not-found --include-uninitialized --wait=true -l release=\"#{release_name}\""])
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: false)))
 
expect { subject.cleanup(release_name: release_name) }.to raise_error(described_class::CommandFailedError)
Loading
Loading
@@ -23,7 +23,7 @@ RSpec.describe Quality::KubernetesClient do
expect(Gitlab::Popen).to receive(:popen_with_detail)
.with([%(kubectl --namespace "#{namespace}" delete ) \
'ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa ' \
"--now --ignore-not-found --include-uninitialized -l release=\"#{release_name}\""])
"--now --ignore-not-found --include-uninitialized --wait=true -l release=\"#{release_name}\""])
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true)))
 
# We're not verifying the output here, just silencing it
Loading
Loading
@@ -37,7 +37,7 @@ RSpec.describe Quality::KubernetesClient do
expect(Gitlab::Popen).to receive(:popen_with_detail)
.with([%(kubectl --namespace "#{namespace}" delete ) \
'ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa ' \
"--now --ignore-not-found --include-uninitialized -l 'release in (#{release_name.join(', ')})'"])
"--now --ignore-not-found --include-uninitialized --wait=true -l 'release in (#{release_name.join(', ')})'"])
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: false)))
 
expect { subject.cleanup(release_name: release_name) }.to raise_error(described_class::CommandFailedError)
Loading
Loading
@@ -47,12 +47,35 @@ RSpec.describe Quality::KubernetesClient do
expect(Gitlab::Popen).to receive(:popen_with_detail)
.with([%(kubectl --namespace "#{namespace}" delete ) \
'ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa ' \
"--now --ignore-not-found --include-uninitialized -l 'release in (#{release_name.join(', ')})'"])
"--now --ignore-not-found --include-uninitialized --wait=true -l 'release in (#{release_name.join(', ')})'"])
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true)))
 
# We're not verifying the output here, just silencing it
expect { subject.cleanup(release_name: release_name) }.to output.to_stdout
end
end
context 'with `wait: false`' do
it 'raises an error if the Kubernetes command fails' do
expect(Gitlab::Popen).to receive(:popen_with_detail)
.with([%(kubectl --namespace "#{namespace}" delete ) \
'ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa ' \
"--now --ignore-not-found --include-uninitialized --wait=false -l release=\"#{release_name}\""])
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: false)))
expect { subject.cleanup(release_name: release_name, wait: false) }.to raise_error(described_class::CommandFailedError)
end
it 'calls kubectl with the correct arguments' do
expect(Gitlab::Popen).to receive(:popen_with_detail)
.with([%(kubectl --namespace "#{namespace}" delete ) \
'ingress,svc,pdb,hpa,deploy,statefulset,job,pod,secret,configmap,pvc,secret,clusterrole,clusterrolebinding,role,rolebinding,sa ' \
"--now --ignore-not-found --include-uninitialized --wait=false -l release=\"#{release_name}\""])
.and_return(Gitlab::Popen::Result.new([], '', '', double(success?: true)))
# We're not verifying the output here, just silencing it
expect { subject.cleanup(release_name: release_name, wait: false) }.to output.to_stdout
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment