summaryrefslogtreecommitdiff
path: root/spec/workers/expire_job_cache_worker_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:18:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 18:18:33 +0000
commitf64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch)
treea2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /spec/workers/expire_job_cache_worker_spec.rb
parentbfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff)
downloadgitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'spec/workers/expire_job_cache_worker_spec.rb')
-rw-r--r--spec/workers/expire_job_cache_worker_spec.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/workers/expire_job_cache_worker_spec.rb b/spec/workers/expire_job_cache_worker_spec.rb
index b4f8f56563b..95c54a762a4 100644
--- a/spec/workers/expire_job_cache_worker_spec.rb
+++ b/spec/workers/expire_job_cache_worker_spec.rb
@@ -13,7 +13,6 @@ RSpec.describe ExpireJobCacheWorker do
include_examples 'an idempotent worker' do
it 'invalidates Etag caching for the job path' do
- pipeline_path = "/#{project.full_path}/-/pipelines/#{pipeline.id}.json"
job_path = "/#{project.full_path}/builds/#{job.id}.json"
spy_store = Gitlab::EtagCaching::Store.new
@@ -22,13 +21,12 @@ RSpec.describe ExpireJobCacheWorker do
expect(spy_store).to receive(:touch)
.exactly(worker_exec_times).times
- .with(pipeline_path)
+ .with(job_path)
.and_call_original
- expect(spy_store).to receive(:touch)
+ expect(ExpirePipelineCacheWorker).to receive(:perform_async)
+ .with(pipeline.id)
.exactly(worker_exec_times).times
- .with(job_path)
- .and_call_original
subject
end