summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb')
-rw-r--r--spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb30
1 files changed, 10 insertions, 20 deletions
diff --git a/spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb b/spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb
index a54c840dd8e..8d71b117107 100644
--- a/spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb
+++ b/spec/lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid_spec.rb
@@ -73,26 +73,6 @@ RSpec.describe Gitlab::BackgroundMigration::RecalculateVulnerabilitiesOccurrence
subject { described_class.new.perform(start_id, end_id) }
- context 'when the migration is disabled by the feature flag' do
- let(:start_id) { 1 }
- let(:end_id) { 1001 }
-
- before do
- stub_feature_flags(migrate_vulnerability_finding_uuids: false)
- end
-
- it 'logs the info message and does not run the migration' do
- expect_next_instance_of(Gitlab::BackgroundMigration::Logger) do |instance|
- expect(instance).to receive(:info).once.with(message: 'Migration is disabled by the feature flag',
- migrator: 'RecalculateVulnerabilitiesOccurrencesUuid',
- start_id: start_id,
- end_id: end_id)
- end
-
- subject
- end
- end
-
context "when finding has a UUIDv4" do
before do
@uuid_v4 = create_finding!(
@@ -474,6 +454,16 @@ RSpec.describe Gitlab::BackgroundMigration::RecalculateVulnerabilitiesOccurrence
allow(Gitlab::ErrorTracking).to receive(:track_and_raise_exception)
expect(Gitlab::ErrorTracking).to have_received(:track_and_raise_exception).with(expected_error).once
end
+
+ it_behaves_like 'marks background migration job records' do
+ let(:arguments) { [1, 4] }
+ subject { described_class.new }
+ end
+ end
+
+ it_behaves_like 'marks background migration job records' do
+ let(:arguments) { [1, 4] }
+ subject { described_class.new }
end
private