diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-31 15:09:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-31 15:09:12 +0300 |
commit | 8243505178033432b7fc6834eef425c9dcdfd7bc (patch) | |
tree | 0497dc786de7ae7563141055bc67d43645489f69 /spec/services | |
parent | dcbe65b8b6d3be931c10a823d1271318f70b1507 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/ci/abort_pipelines_service_spec.rb | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/spec/services/ci/abort_pipelines_service_spec.rb b/spec/services/ci/abort_pipelines_service_spec.rb index db25faff70f..9f9519d6829 100644 --- a/spec/services/ci/abort_pipelines_service_spec.rb +++ b/spec/services/ci/abort_pipelines_service_spec.rb @@ -94,28 +94,5 @@ RSpec.describe Ci::AbortPipelinesService do end end end - - context 'with user pipelines' do - def abort_user_pipelines - described_class.new.execute(user.pipelines, :user_blocked) - end - - it 'fails all running pipelines and related jobs' do - expect(abort_user_pipelines).to be_success - - expect_correct_cancellations - - expect(other_users_pipeline.status).not_to eq('failed') - end - - it 'avoids N+1 queries' do - control_count = ActiveRecord::QueryRecorder.new { abort_user_pipelines }.count - - pipelines = create_list(:ci_pipeline, 5, :running, project: project, user: user) - create_list(:ci_build, 5, :running, pipeline: pipelines.first) - - expect { abort_user_pipelines }.not_to exceed_query_limit(control_count) - end - end end end |