diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /spec/services/ci/abort_pipelines_service_spec.rb | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'spec/services/ci/abort_pipelines_service_spec.rb')
-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 |