Commit b1f78cf2 authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch 'improving-atomic-test-performance' into 'master'

Improve performance of atomic processing service tests

See merge request gitlab-org/gitlab!56550
parents bab2294c aafbb3bd
# frozen_string_literal: true # frozen_string_literal: true
RSpec.shared_context 'Pipeline Processing Service Tests With Yaml' do RSpec.shared_context 'Pipeline Processing Service Tests With Yaml' do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { project.owner }
where(:test_file_path) do where(:test_file_path) do
Dir.glob(Rails.root.join('spec/services/ci/pipeline_processing/test_cases/*.yml')) Dir.glob(Rails.root.join('spec/services/ci/pipeline_processing/test_cases/*.yml'))
end end
with_them do with_them do
let(:test_file) { YAML.load_file(test_file_path) } let(:test_file) { YAML.load_file(test_file_path) }
let(:user) { create(:user) }
let(:project) { create(:project, :repository) }
let(:pipeline) { Ci::CreatePipelineService.new(project, user, ref: 'master').execute(:pipeline) } let(:pipeline) { Ci::CreatePipelineService.new(project, user, ref: 'master').execute(:pipeline) }
before do before do
stub_ci_pipeline_yaml_file(YAML.dump(test_file['config'])) stub_ci_pipeline_yaml_file(YAML.dump(test_file['config']))
stub_not_protect_default_branch
project.add_developer(user)
end end
it 'follows transitions' do it 'follows transitions' 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