diff options
author | Toon Claes <toon@gitlab.com> | 2017-04-18 21:26:56 +0200 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-04-24 10:07:01 +0200 |
commit | ccb9beeed0e418ef4dea201b3507bd2f4a14b4a2 (patch) | |
tree | ff75331541746d5ab9e27d9151cbccdae214fb43 /spec/services | |
parent | f07edb5af1e18be817e49e0afd86f59a6eef1cd9 (diff) | |
download | gitlab-ce-ccb9beeed0e418ef4dea201b3507bd2f4a14b4a2.tar.gz |
Properly expire cache for **all** MRs of a pipeline
Turn ExpirePipelineCacheService into Worker so it can fetch all the
merge requests for which the pipeline runs or did run against.
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/ci/expire_pipeline_cache_service_spec.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/spec/services/ci/expire_pipeline_cache_service_spec.rb b/spec/services/ci/expire_pipeline_cache_service_spec.rb deleted file mode 100644 index 166c6dfc93e..00000000000 --- a/spec/services/ci/expire_pipeline_cache_service_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'spec_helper' - -describe Ci::ExpirePipelineCacheService, services: true do - let(:user) { create(:user) } - let(:project) { create(:empty_project) } - let(:pipeline) { create(:ci_pipeline, project: project) } - subject { described_class.new(project, user) } - - describe '#execute' do - it 'invalidate Etag caching for project pipelines path' do - pipelines_path = "/#{project.full_path}/pipelines.json" - new_mr_pipelines_path = "/#{project.full_path}/merge_requests/new.json" - - expect_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch).with(pipelines_path) - expect_any_instance_of(Gitlab::EtagCaching::Store).to receive(:touch).with(new_mr_pipelines_path) - - subject.execute(pipeline) - end - - it 'updates the cached status for a project' do - expect(Gitlab::Cache::Ci::ProjectPipelineStatus).to receive(:update_for_pipeline). - with(pipeline) - - subject.execute(pipeline) - end - end -end |