Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-09 18:07:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-09 18:07:50 +0300
commitfb19b392e2331e7663c3d65c05aeb81a1db3630d (patch)
treeedec8b9bfc56a39279df88578ccb6da5ca4783b4 /spec/workers/container_registry
parente4b9c52cc9ca9478d9881d03f31517be46376060 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/workers/container_registry')
-rw-r--r--spec/workers/container_registry/migration/enqueuer_worker_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/workers/container_registry/migration/enqueuer_worker_spec.rb b/spec/workers/container_registry/migration/enqueuer_worker_spec.rb
index a24b46501e9..0ae31422d12 100644
--- a/spec/workers/container_registry/migration/enqueuer_worker_spec.rb
+++ b/spec/workers/container_registry/migration/enqueuer_worker_spec.rb
@@ -37,9 +37,23 @@ RSpec.describe ContainerRegistry::Migration::EnqueuerWorker, :aggregate_failures
it 're-enqueues the worker' do
expect(described_class).to receive(:perform_async)
+ expect(described_class).to receive(:perform_in).with(7.seconds)
subject
end
+
+ context 'enqueue_twice feature flag disabled' do
+ before do
+ stub_feature_flags(container_registry_migration_phase2_enqueue_twice: false)
+ end
+
+ it 'only enqueues the worker once' do
+ expect(described_class).to receive(:perform_async)
+ expect(described_class).not_to receive(:perform_in)
+
+ subject
+ end
+ end
end
context 'above capacity' do
@@ -49,6 +63,7 @@ RSpec.describe ContainerRegistry::Migration::EnqueuerWorker, :aggregate_failures
it 'does not re-enqueue the worker' do
expect(described_class).not_to receive(:perform_async)
+ expect(described_class).not_to receive(:perform_in).with(7.seconds)
subject
end
@@ -95,6 +110,7 @@ RSpec.describe ContainerRegistry::Migration::EnqueuerWorker, :aggregate_failures
it 'does not re-enqueue the worker' do
expect(described_class).not_to receive(:perform_async)
+ expect(described_class).not_to receive(:perform_in)
subject
end
@@ -142,6 +158,7 @@ RSpec.describe ContainerRegistry::Migration::EnqueuerWorker, :aggregate_failures
it 'does not re-enqueue the worker' do
expect(ContainerRegistry::Migration::EnqueuerWorker).not_to receive(:perform_async)
+ expect(ContainerRegistry::Migration::EnqueuerWorker).not_to receive(:perform_in)
subject
end