diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-01-17 15:06:37 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-01-24 20:50:42 +0900 |
commit | 3cc3650dfee5132c120b2b418918f12b3eebcde2 (patch) | |
tree | 0497feec4829ed16e0b0d37954b0998a4d8fac15 /spec/workers/expire_build_artifacts_worker_spec.rb | |
parent | 490eeb5159945107576c756b22c08f99b45a8463 (diff) | |
download | gitlab-ce-3cc3650dfee5132c120b2b418918f12b3eebcde2.tar.gz |
Remove expired artifacts periodically
Rename
Introduce Destroy expired job artifacts service
Revert a bit
Add changelog
Use expired
Improve
Fix spec
Fix spec
Use bang for destroy
Introduce iteration limit
Update comment
Simplify more
Refacor
Remove unnecessary thing
Fix comments
Fix coding offence
Make loop helper exception free
Diffstat (limited to 'spec/workers/expire_build_artifacts_worker_spec.rb')
-rw-r--r-- | spec/workers/expire_build_artifacts_worker_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/workers/expire_build_artifacts_worker_spec.rb b/spec/workers/expire_build_artifacts_worker_spec.rb index b47b4a02a68..27995cf1611 100644 --- a/spec/workers/expire_build_artifacts_worker_spec.rb +++ b/spec/workers/expire_build_artifacts_worker_spec.rb @@ -11,6 +11,7 @@ describe ExpireBuildArtifactsWorker do describe '#perform' do before do + stub_feature_flags(ci_new_expire_job_artifacts_service: false) build end @@ -47,4 +48,17 @@ describe ExpireBuildArtifactsWorker do Sidekiq::Queues.jobs_by_worker['ExpireBuildInstanceArtifactsWorker'] end end + + describe '#perform with ci_new_expire_job_artifacts_service feature flag' do + before do + stub_feature_flags(ci_new_expire_job_artifacts_service: true) + end + + it 'executes a service' do + expect_any_instance_of(Ci::DestroyExpiredJobArtifactsService).to receive(:execute) + expect(ExpireBuildInstanceArtifactsWorker).not_to receive(:bulk_perform_async) + + worker.perform + end + end end |