Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/ci')
-rw-r--r--spec/services/ci/process_pipeline_service_spec.rb8
-rw-r--r--spec/services/ci/retry_build_service_spec.rb12
-rw-r--r--spec/services/ci/retry_pipeline_service_spec.rb8
-rw-r--r--spec/services/ci/stop_environments_service_spec.rb16
-rw-r--r--spec/services/ci/update_build_queue_service_spec.rb16
5 files changed, 30 insertions, 30 deletions
diff --git a/spec/services/ci/process_pipeline_service_spec.rb b/spec/services/ci/process_pipeline_service_spec.rb
index ce691004178..ef2ddc4b1d7 100644
--- a/spec/services/ci/process_pipeline_service_spec.rb
+++ b/spec/services/ci/process_pipeline_service_spec.rb
@@ -284,14 +284,14 @@ describe Ci::ProcessPipelineService, :services do
pipeline.builds.running_or_pending.each(&:success)
- expect(builds.pluck(:name)).
- to contain_exactly('build:1', 'build:2', 'test:1', 'test:2')
+ expect(builds.pluck(:name))
+ .to contain_exactly('build:1', 'build:2', 'test:1', 'test:2')
pipeline.builds.find_by(name: 'test:1').success
pipeline.builds.find_by(name: 'test:2').drop
- expect(builds.pluck(:name)).
- to contain_exactly('build:1', 'build:2', 'test:1', 'test:2')
+ expect(builds.pluck(:name))
+ .to contain_exactly('build:1', 'build:2', 'test:1', 'test:2')
Ci::Build.retry(pipeline.builds.find_by(name: 'test:2'), user).success
diff --git a/spec/services/ci/retry_build_service_spec.rb b/spec/services/ci/retry_build_service_spec.rb
index 6499c7ad63e..d03f7505eac 100644
--- a/spec/services/ci/retry_build_service_spec.rb
+++ b/spec/services/ci/retry_build_service_spec.rb
@@ -61,8 +61,8 @@ describe Ci::RetryBuildService, :services do
end
it 'resolves todos for old build that failed' do
- expect(MergeRequests::AddTodoWhenBuildFailsService).
- to receive_message_chain(:new, :close)
+ expect(MergeRequests::AddTodoWhenBuildFailsService)
+ .to receive_message_chain(:new, :close)
service.execute(build)
end
@@ -82,8 +82,8 @@ describe Ci::RetryBuildService, :services do
context 'when user does not have ability to execute build' do
it 'raises an error' do
- expect { service.execute(build) }.
- to raise_error Gitlab::Access::AccessDeniedError
+ expect { service.execute(build) }
+ .to raise_error Gitlab::Access::AccessDeniedError
end
end
end
@@ -109,8 +109,8 @@ describe Ci::RetryBuildService, :services do
context 'when user does not have ability to execute build' do
it 'raises an error' do
- expect { service.reprocess(build) }.
- to raise_error Gitlab::Access::AccessDeniedError
+ expect { service.reprocess(build) }
+ .to raise_error Gitlab::Access::AccessDeniedError
end
end
end
diff --git a/spec/services/ci/retry_pipeline_service_spec.rb b/spec/services/ci/retry_pipeline_service_spec.rb
index 84915b5f1aa..c0af8b8450a 100644
--- a/spec/services/ci/retry_pipeline_service_spec.rb
+++ b/spec/services/ci/retry_pipeline_service_spec.rb
@@ -134,8 +134,8 @@ describe Ci::RetryPipelineService, '#execute', :services do
end
it 'closes all todos about failed jobs for pipeline' do
- expect(MergeRequests::AddTodoWhenBuildFailsService).
- to receive_message_chain(:new, :close_all)
+ expect(MergeRequests::AddTodoWhenBuildFailsService)
+ .to receive_message_chain(:new, :close_all)
service.execute(pipeline)
end
@@ -149,8 +149,8 @@ describe Ci::RetryPipelineService, '#execute', :services do
context 'when user is not allowed to retry pipeline' do
it 'raises an error' do
- expect { service.execute(pipeline) }.
- to raise_error Gitlab::Access::AccessDeniedError
+ expect { service.execute(pipeline) }
+ .to raise_error Gitlab::Access::AccessDeniedError
end
end
diff --git a/spec/services/ci/stop_environments_service_spec.rb b/spec/services/ci/stop_environments_service_spec.rb
index 23e0856fecd..560f83d94f7 100644
--- a/spec/services/ci/stop_environments_service_spec.rb
+++ b/spec/services/ci/stop_environments_service_spec.rb
@@ -44,8 +44,8 @@ describe Ci::StopEnvironmentsService, services: true do
context 'when environment is not stopped' do
before do
- allow_any_instance_of(Environment).
- to receive(:state).and_return(:stopped)
+ allow_any_instance_of(Environment)
+ .to receive(:state).and_return(:stopped)
end
it 'does not stop environment' do
@@ -83,22 +83,22 @@ describe Ci::StopEnvironmentsService, services: true do
context 'when environment does not exist' do
it 'does not raise error' do
- expect { service.execute('master') }.
- not_to raise_error
+ expect { service.execute('master') }
+ .not_to raise_error
end
end
end
def expect_environment_stopped_on(branch)
- expect_any_instance_of(Environment).
- to receive(:stop!)
+ expect_any_instance_of(Environment)
+ .to receive(:stop!)
service.execute(branch)
end
def expect_environment_not_stopped_on(branch)
- expect_any_instance_of(Environment).
- not_to receive(:stop!)
+ expect_any_instance_of(Environment)
+ .not_to receive(:stop!)
service.execute(branch)
end
diff --git a/spec/services/ci/update_build_queue_service_spec.rb b/spec/services/ci/update_build_queue_service_spec.rb
index 14092d9dcca..f01a388b895 100644
--- a/spec/services/ci/update_build_queue_service_spec.rb
+++ b/spec/services/ci/update_build_queue_service_spec.rb
@@ -12,15 +12,15 @@ describe Ci::UpdateBuildQueueService, :services do
before { build.project.runners << runner }
it 'ticks runner queue value' do
- expect { subject.execute(build) }.
- to change { runner.ensure_runner_queue_value }
+ expect { subject.execute(build) }
+ .to change { runner.ensure_runner_queue_value }
end
end
context 'when there are no runners that can pick build' do
it 'does not tick runner queue value' do
- expect { subject.execute(build) }.
- not_to change { runner.ensure_runner_queue_value }
+ expect { subject.execute(build) }
+ .not_to change { runner.ensure_runner_queue_value }
end
end
end
@@ -30,8 +30,8 @@ describe Ci::UpdateBuildQueueService, :services do
context 'when there are runner that can pick build' do
it 'ticks runner queue value' do
- expect { subject.execute(build) }.
- to change { runner.ensure_runner_queue_value }
+ expect { subject.execute(build) }
+ .to change { runner.ensure_runner_queue_value }
end
end
@@ -39,8 +39,8 @@ describe Ci::UpdateBuildQueueService, :services do
before { build.tag_list = [:docker] }
it 'does not tick runner queue value' do
- expect { subject.execute(build) }.
- not_to change { runner.ensure_runner_queue_value }
+ expect { subject.execute(build) }
+ .not_to change { runner.ensure_runner_queue_value }
end
end
end