Commit 01226c75 authored by 🤖 GitLab Bot 🤖's avatar 🤖 GitLab Bot 🤖

Add latest changes from gitlab-org/gitlab@master

parent 90184b64
Pipeline #108764722 passed with stages
in 93 minutes and 50 seconds
......@@ -43,7 +43,23 @@ module QA::Specs::Helpers
# the quarantined tests when they're not run so that we're aware of them
skip("Only running tests tagged with :quarantine and any of #{included_filters.keys}") if should_skip_when_focused?(example.metadata, included_filters)
else
skip('In quarantine') if example.metadata.key?(:quarantine)
if example.metadata.key?(:quarantine)
quarantine_message = %w(In quarantine)
quarantine_tag = example.metadata[:quarantine]
if !!quarantine_tag
quarantine_message << case quarantine_tag
when String
": #{quarantine_tag}"
when Hash
": #{quarantine_tag[:issue]}"
else
''
end
end
skip(quarantine_message.join(' ').strip)
end
end
end
......
......@@ -155,6 +155,26 @@ describe QA::Specs::Helpers::Quarantine do
expect(group.examples.first.execution_result.status).to eq(:passed)
end
context 'quarantine message' do
shared_examples 'test with quarantine message' do |quarantine_tag|
it 'outputs the quarantine message' do
group = describe_successfully do
it('is quarantined', quarantine: quarantine_tag) {}
end
expect(group.examples.first.execution_result.pending_message)
.to eq('In quarantine : for a reason')
end
end
it_behaves_like 'test with quarantine message', 'for a reason'
it_behaves_like 'test with quarantine message', {
issue: 'for a reason',
environment: [:nightly, :staging]
}
end
end
context 'with :quarantine focused' do
......
......@@ -43,8 +43,7 @@ RSpec.describe ContainerExpirationPolicy, type: :model do
subject { described_class.preloaded }
before do
# container_expiration_policies are created for every new project
create_list(:project, 3)
create_list(:container_expiration_policy, 3)
end
it 'preloads the associations' do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment