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:
authorToon Claes <toon@gitlab.com>2017-04-21 18:39:19 +0300
committerToon Claes <toon@gitlab.com>2017-04-24 11:23:41 +0300
commit14642e3c28ae40d2ecf409c327e29e6c3add63fa (patch)
tree890a3e495659f9f228d680bf5a9fdc12be2a83aa /spec/workers
parentc623c41c2f917e0773a6e3f0b6c78b027ca846f7 (diff)
Refactor ExpirePipelineCacheWorker#perform
Make it gracefully handle unexisting pipelines and refactor iterating all the merge request paths.
Diffstat (limited to 'spec/workers')
-rw-r--r--spec/workers/expire_pipeline_cache_worker_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/workers/expire_pipeline_cache_worker_spec.rb b/spec/workers/expire_pipeline_cache_worker_spec.rb
index 67f01539ada..58f587f6d11 100644
--- a/spec/workers/expire_pipeline_cache_worker_spec.rb
+++ b/spec/workers/expire_pipeline_cache_worker_spec.rb
@@ -29,6 +29,12 @@ describe ExpirePipelineCacheWorker do
subject.perform(pipeline.id)
end
+ it "doesn't do anything if the pipeline not exist" do
+ expect_any_instance_of(Gitlab::EtagCaching::Store).not_to receive(:touch)
+
+ subject.perform(617748)
+ end
+
it 'updates the cached status for a project' do
expect(Gitlab::Cache::Ci::ProjectPipelineStatus).to receive(:update_for_pipeline).
with(pipeline)