diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb')
-rw-r--r-- | spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb b/spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb index a17fee6bab2..791c0595f0e 100644 --- a/spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb +++ b/spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb @@ -10,27 +10,10 @@ RSpec.describe BackfillIncidentIssueEscalationStatuses do let(:namespace) { namespaces.create!(name: 'foo', path: 'foo') } let(:project) { projects.create!(namespace_id: namespace.id) } - before do - stub_const("#{described_class.name}::BATCH_SIZE", 1) - end - - it 'schedules jobs for incident issues' do - issue_1 = issues.create!(project_id: project.id) # non-incident issue - incident_1 = issues.create!(project_id: project.id, issue_type: 1) - incident_2 = issues.create!(project_id: project.id, issue_type: 1) - - Sidekiq::Testing.fake! do - freeze_time do - migrate! + # Backfill removed - see db/migrate/20220321234317_remove_all_issuable_escalation_statuses.rb. + it 'does nothing' do + issues.create!(project_id: project.id, issue_type: 1) - expect(described_class::MIGRATION).to be_scheduled_delayed_migration( - 2.minutes, issue_1.id, issue_1.id) - expect(described_class::MIGRATION).to be_scheduled_delayed_migration( - 4.minutes, incident_1.id, incident_1.id) - expect(described_class::MIGRATION).to be_scheduled_delayed_migration( - 6.minutes, incident_2.id, incident_2.id) - expect(BackgroundMigrationWorker.jobs.size).to eq(3) - end - end + expect { migrate! }.not_to change { BackgroundMigrationWorker.jobs.size } end end |