diff options
Diffstat (limited to 'spec/workers/dependency_proxy')
-rw-r--r-- | spec/workers/dependency_proxy/cleanup_dependency_proxy_worker_spec.rb | 4 | ||||
-rw-r--r-- | spec/workers/dependency_proxy/image_ttl_group_policy_worker_spec.rb | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/workers/dependency_proxy/cleanup_dependency_proxy_worker_spec.rb b/spec/workers/dependency_proxy/cleanup_dependency_proxy_worker_spec.rb index ed0bdefbdb8..1100f9a7fae 100644 --- a/spec/workers/dependency_proxy/cleanup_dependency_proxy_worker_spec.rb +++ b/spec/workers/dependency_proxy/cleanup_dependency_proxy_worker_spec.rb @@ -9,8 +9,8 @@ RSpec.describe DependencyProxy::CleanupDependencyProxyWorker do context 'when there are records to be deleted' do it_behaves_like 'an idempotent worker' do it 'queues the cleanup jobs', :aggregate_failures do - create(:dependency_proxy_blob, :expired) - create(:dependency_proxy_manifest, :expired) + create(:dependency_proxy_blob, :pending_destruction) + create(:dependency_proxy_manifest, :pending_destruction) expect(DependencyProxy::CleanupBlobWorker).to receive(:perform_with_capacity).twice expect(DependencyProxy::CleanupManifestWorker).to receive(:perform_with_capacity).twice diff --git a/spec/workers/dependency_proxy/image_ttl_group_policy_worker_spec.rb b/spec/workers/dependency_proxy/image_ttl_group_policy_worker_spec.rb index b035a2ec0b7..6a2fdfbe8f5 100644 --- a/spec/workers/dependency_proxy/image_ttl_group_policy_worker_spec.rb +++ b/spec/workers/dependency_proxy/image_ttl_group_policy_worker_spec.rb @@ -17,19 +17,19 @@ RSpec.describe DependencyProxy::ImageTtlGroupPolicyWorker do let_it_be_with_reload(:new_blob) { create(:dependency_proxy_blob, group: group) } let_it_be_with_reload(:new_manifest) { create(:dependency_proxy_manifest, group: group) } - it 'updates the old images to expired' do + it 'updates the old images to pending_destruction' do expect { subject } - .to change { old_blob.reload.status }.from('default').to('expired') - .and change { old_manifest.reload.status }.from('default').to('expired') + .to change { old_blob.reload.status }.from('default').to('pending_destruction') + .and change { old_manifest.reload.status }.from('default').to('pending_destruction') .and not_change { new_blob.reload.status } .and not_change { new_manifest.reload.status } end end context 'counts logging' do - let_it_be(:expired_blob) { create(:dependency_proxy_blob, :expired, group: group) } - let_it_be(:expired_blob2) { create(:dependency_proxy_blob, :expired, group: group) } - let_it_be(:expired_manifest) { create(:dependency_proxy_manifest, :expired, group: group) } + let_it_be(:expired_blob) { create(:dependency_proxy_blob, :pending_destruction, group: group) } + let_it_be(:expired_blob2) { create(:dependency_proxy_blob, :pending_destruction, group: group) } + let_it_be(:expired_manifest) { create(:dependency_proxy_manifest, :pending_destruction, group: group) } let_it_be(:processing_blob) { create(:dependency_proxy_blob, status: :processing, group: group) } let_it_be(:processing_manifest) { create(:dependency_proxy_manifest, status: :processing, group: group) } let_it_be(:error_blob) { create(:dependency_proxy_blob, status: :error, group: group) } |