diff options
author | Toon Claes <toon@gitlab.com> | 2017-04-21 17:39:19 +0200 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-04-24 10:23:41 +0200 |
commit | 14642e3c28ae40d2ecf409c327e29e6c3add63fa (patch) | |
tree | 890a3e495659f9f228d680bf5a9fdc12be2a83aa /spec/workers | |
parent | c623c41c2f917e0773a6e3f0b6c78b027ca846f7 (diff) | |
download | gitlab-ce-14642e3c28ae40d2ecf409c327e29e6c3add63fa.tar.gz |
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.rb | 6 |
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) |