diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-03-06 21:40:50 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-03-06 21:44:15 +0900 |
commit | 0ac1322045bd6d069aa74da04df7fb2d2797a3f0 (patch) | |
tree | bec78a5081e9791a47c4122910ca61278ec32621 /spec/workers | |
parent | 335bc0fec05d282e2e4daa0e4a1bcb82ddec0594 (diff) | |
download | gitlab-ce-0ac1322045bd6d069aa74da04df7fb2d2797a3f0.tar.gz |
Fix tests by latest proposal changesproper-fix-for-artifacts-service
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/archive_legacy_trace_worker_spec.rb | 30 | ||||
-rw-r--r-- | spec/workers/archive_trace_worker_spec.rb (renamed from spec/workers/create_trace_artifact_worker_spec.rb) | 2 | ||||
-rw-r--r-- | spec/workers/build_finished_worker_spec.rb | 2 | ||||
-rw-r--r-- | spec/workers/concerns/pipeline_background_queue_spec.rb | 2 |
4 files changed, 3 insertions, 33 deletions
diff --git a/spec/workers/archive_legacy_trace_worker_spec.rb b/spec/workers/archive_legacy_trace_worker_spec.rb deleted file mode 100644 index 28b247e3058..00000000000 --- a/spec/workers/archive_legacy_trace_worker_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'spec_helper' - -describe ArchiveLegacyTraceWorker do - it { is_expected.to be_a(ObjectStorageQueue) } - it { is_expected.not_to be_a(PipelineQueue) } - - describe '#perform' do - subject { described_class.new.perform(job&.id) } - - context 'when job is found' do - let(:job) { create(:ci_build) } - - it 'executes service' do - expect_any_instance_of(Gitlab::Ci::Trace).to receive(:archive!) - - subject - end - end - - context 'when job is not found' do - let(:job) { nil } - - it 'does not execute service' do - expect_any_instance_of(Gitlab::Ci::Trace).not_to receive(:archive!) - - subject - end - end - end -end diff --git a/spec/workers/create_trace_artifact_worker_spec.rb b/spec/workers/archive_trace_worker_spec.rb index 5fc2b183abc..b768588c6e1 100644 --- a/spec/workers/create_trace_artifact_worker_spec.rb +++ b/spec/workers/archive_trace_worker_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe CreateTraceArtifactWorker do +describe ArchiveTraceWorker do describe '#perform' do subject { described_class.new.perform(job&.id) } diff --git a/spec/workers/build_finished_worker_spec.rb b/spec/workers/build_finished_worker_spec.rb index c7ff8cf3b92..acd8da11d8d 100644 --- a/spec/workers/build_finished_worker_spec.rb +++ b/spec/workers/build_finished_worker_spec.rb @@ -14,7 +14,7 @@ describe BuildFinishedWorker do expect_any_instance_of(BuildTraceSectionsWorker).to receive(:perform) expect_any_instance_of(BuildCoverageWorker).to receive(:perform) expect(BuildHooksWorker).to receive(:perform_async) - expect(CreateTraceArtifactWorker).to receive(:perform_async) + expect(ArchiveTraceWorker).to receive(:perform_async) described_class.new.perform(build.id) end diff --git a/spec/workers/concerns/pipeline_background_queue_spec.rb b/spec/workers/concerns/pipeline_background_queue_spec.rb index e1ee85ae238..24c0a3c6a20 100644 --- a/spec/workers/concerns/pipeline_background_queue_spec.rb +++ b/spec/workers/concerns/pipeline_background_queue_spec.rb @@ -14,6 +14,6 @@ describe PipelineBackgroundQueue do it 'sets a default object storage queue automatically' do expect(worker.sidekiq_options['queue']) - .to eq 'object_storage:dummy' + .to eq 'pipeline_background:dummy' end end |