diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-23 09:06:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-23 09:06:03 +0000 |
commit | b3e4ec8e8adf4fe96c982124e91b6a05021a9cda (patch) | |
tree | 5fda0011a7cc7de000186e465e61f893d478a1c8 /spec/migrations | |
parent | 90cdc9391171e1be29b2b57a2e2aad0c02c2a7a9 (diff) | |
download | gitlab-ce-b3e4ec8e8adf4fe96c982124e91b6a05021a9cda.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations')
10 files changed, 14 insertions, 14 deletions
diff --git a/spec/migrations/active_record/schedule_set_confidential_note_events_on_services_spec.rb b/spec/migrations/active_record/schedule_set_confidential_note_events_on_services_spec.rb index 826c5a2324b..f4155eab1bf 100644 --- a/spec/migrations/active_record/schedule_set_confidential_note_events_on_services_spec.rb +++ b/spec/migrations/active_record/schedule_set_confidential_note_events_on_services_spec.rb @@ -32,7 +32,7 @@ describe ScheduleSetConfidentialNoteEventsOnServices, :migration, :sidekiq do end end - it 'correctly processes services' do + it 'correctly processes services', :sidekiq_might_not_need_inline do perform_enqueued_jobs do expect(services_table.where(confidential_note_events: nil).count).to eq 4 expect(services_table.where(confidential_note_events: true).count).to eq 1 diff --git a/spec/migrations/backfill_store_project_full_path_in_repo_spec.rb b/spec/migrations/backfill_store_project_full_path_in_repo_spec.rb index 65a918d5440..913b4d3f114 100644 --- a/spec/migrations/backfill_store_project_full_path_in_repo_spec.rb +++ b/spec/migrations/backfill_store_project_full_path_in_repo_spec.rb @@ -20,7 +20,7 @@ describe BackfillStoreProjectFullPathInRepo, :migration do describe '#up' do shared_examples_for 'writes the full path to git config' do - it 'writes the git config' do + it 'writes the git config', :sidekiq_might_not_need_inline do expect_next_instance_of(Gitlab::GitalyClient::RepositoryService) do |repository_service| allow(repository_service).to receive(:cleanup) expect(repository_service).to receive(:set_config).with('gitlab.fullpath' => expected_path) @@ -29,7 +29,7 @@ describe BackfillStoreProjectFullPathInRepo, :migration do migration.up end - it 'retries in case of failure' do + it 'retries in case of failure', :sidekiq_might_not_need_inline do repository_service = spy(:repository_service) allow(Gitlab::GitalyClient::RepositoryService).to receive(:new).and_return(repository_service) @@ -40,7 +40,7 @@ describe BackfillStoreProjectFullPathInRepo, :migration do migration.up end - it 'cleans up repository before writing the config' do + it 'cleans up repository before writing the config', :sidekiq_might_not_need_inline do expect_next_instance_of(Gitlab::GitalyClient::RepositoryService) do |repository_service| expect(repository_service).to receive(:cleanup).ordered expect(repository_service).to receive(:set_config).ordered @@ -87,7 +87,7 @@ describe BackfillStoreProjectFullPathInRepo, :migration do context 'project in group' do let!(:project) { projects.create!(namespace_id: group.id, name: 'baz', path: 'baz') } - it 'deletes the gitlab full config value' do + it 'deletes the gitlab full config value', :sidekiq_might_not_need_inline do expect_any_instance_of(Gitlab::GitalyClient::RepositoryService) .to receive(:delete_config).with(['gitlab.fullpath']) diff --git a/spec/migrations/fill_file_store_spec.rb b/spec/migrations/fill_file_store_spec.rb index a87d910c73b..806c9283634 100644 --- a/spec/migrations/fill_file_store_spec.rb +++ b/spec/migrations/fill_file_store_spec.rb @@ -23,7 +23,7 @@ describe FillFileStore, :migration do uploads.create!(size: 10, path: 'path', uploader: 'uploader', mount_point: 'file_name', store: nil) end - it 'correctly migrates nullified file_store/store column' do + it 'correctly migrates nullified file_store/store column', :sidekiq_might_not_need_inline do expect(job_artifacts.where(file_store: nil).count).to eq(1) expect(lfs_objects.where(file_store: nil).count).to eq(1) expect(uploads.where(store: nil).count).to eq(1) diff --git a/spec/migrations/fix_wrong_pages_access_level_spec.rb b/spec/migrations/fix_wrong_pages_access_level_spec.rb index 73df6e3b16d..73d8218b95c 100644 --- a/spec/migrations/fix_wrong_pages_access_level_spec.rb +++ b/spec/migrations/fix_wrong_pages_access_level_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' require Rails.root.join('db', 'post_migrate', '20190703185326_fix_wrong_pages_access_level.rb') -describe FixWrongPagesAccessLevel, :migration, :sidekiq, schema: 20190628185004 do +describe FixWrongPagesAccessLevel, :migration, :sidekiq_might_not_need_inline, schema: 20190628185004 do using RSpec::Parameterized::TableSyntax let(:migration_class) { described_class::MIGRATION } diff --git a/spec/migrations/migrate_legacy_artifacts_to_job_artifacts_spec.rb b/spec/migrations/migrate_legacy_artifacts_to_job_artifacts_spec.rb index be39d9cd75a..98bbe0ed5a2 100644 --- a/spec/migrations/migrate_legacy_artifacts_to_job_artifacts_spec.rb +++ b/spec/migrations/migrate_legacy_artifacts_to_job_artifacts_spec.rb @@ -42,7 +42,7 @@ describe MigrateLegacyArtifactsToJobArtifacts, :migration, :sidekiq do end end - it 'migrates legacy artifacts to ci_job_artifacts table' do + it 'migrates legacy artifacts to ci_job_artifacts table', :sidekiq_might_not_need_inline do migrate! expect(job_artifacts.order(:job_id, :file_type).pluck('project_id, job_id, file_type, file_store, size, expire_at, file, file_sha256, file_location')) diff --git a/spec/migrations/schedule_digest_personal_access_tokens_spec.rb b/spec/migrations/schedule_digest_personal_access_tokens_spec.rb index aca95ffee08..ff859d07ff2 100644 --- a/spec/migrations/schedule_digest_personal_access_tokens_spec.rb +++ b/spec/migrations/schedule_digest_personal_access_tokens_spec.rb @@ -34,7 +34,7 @@ describe ScheduleDigestPersonalAccessTokens, :migration, :sidekiq do end end - it 'schedules background migrations' do + it 'schedules background migrations', :sidekiq_might_not_need_inline do perform_enqueued_jobs do plain_text_token = 'token IS NOT NULL' diff --git a/spec/migrations/schedule_fill_valid_time_for_pages_domain_certificates_spec.rb b/spec/migrations/schedule_fill_valid_time_for_pages_domain_certificates_spec.rb index cd431d23fa3..a0241f1d20c 100644 --- a/spec/migrations/schedule_fill_valid_time_for_pages_domain_certificates_spec.rb +++ b/spec/migrations/schedule_fill_valid_time_for_pages_domain_certificates_spec.rb @@ -34,7 +34,7 @@ describe ScheduleFillValidTimeForPagesDomainCertificates, :migration, :sidekiq d end end - it 'sets certificate valid_not_before/not_after' do + it 'sets certificate valid_not_before/not_after', :sidekiq_might_not_need_inline do perform_enqueued_jobs do migrate! diff --git a/spec/migrations/schedule_set_confidential_note_events_on_webhooks_spec.rb b/spec/migrations/schedule_set_confidential_note_events_on_webhooks_spec.rb index cb3cdb44271..845b0515177 100644 --- a/spec/migrations/schedule_set_confidential_note_events_on_webhooks_spec.rb +++ b/spec/migrations/schedule_set_confidential_note_events_on_webhooks_spec.rb @@ -32,7 +32,7 @@ describe ScheduleSetConfidentialNoteEventsOnWebhooks, :migration, :sidekiq do end end - it 'correctly processes web hooks' do + it 'correctly processes web hooks', :sidekiq_might_not_need_inline do perform_enqueued_jobs do expect(web_hooks_table.where(confidential_note_events: nil).count).to eq 4 expect(web_hooks_table.where(confidential_note_events: true).count).to eq 1 diff --git a/spec/migrations/schedule_sync_issuables_state_id_spec.rb b/spec/migrations/schedule_sync_issuables_state_id_spec.rb index bc94f8820bd..4f841e8ce04 100644 --- a/spec/migrations/schedule_sync_issuables_state_id_spec.rb +++ b/spec/migrations/schedule_sync_issuables_state_id_spec.rb @@ -33,7 +33,7 @@ describe ScheduleSyncIssuablesStateId, :migration, :sidekiq do describe '#up' do context 'issues' do - it 'migrates state column to integer' do + it 'migrates state column to integer', :sidekiq_might_not_need_inline do opened_issue = issues.create!(description: 'first', state: 'opened') closed_issue = issues.create!(description: 'second', state: 'closed') invalid_state_issue = issues.create!(description: 'fourth', state: 'not valid') @@ -55,7 +55,7 @@ describe ScheduleSyncIssuablesStateId, :migration, :sidekiq do end context 'merge requests' do - it 'migrates state column to integer' do + it 'migrates state column to integer', :sidekiq_might_not_need_inline do opened_merge_request = merge_requests.create!(state: 'opened', target_project_id: project.id, target_branch: 'feature1', source_branch: 'master') closed_merge_request = merge_requests.create!(state: 'closed', target_project_id: project.id, target_branch: 'feature2', source_branch: 'master') merged_merge_request = merge_requests.create!(state: 'merged', target_project_id: project.id, target_branch: 'feature3', source_branch: 'master') diff --git a/spec/migrations/schedule_to_archive_legacy_traces_spec.rb b/spec/migrations/schedule_to_archive_legacy_traces_spec.rb index 3f05c4aefd3..a81fb1494c7 100644 --- a/spec/migrations/schedule_to_archive_legacy_traces_spec.rb +++ b/spec/migrations/schedule_to_archive_legacy_traces_spec.rb @@ -25,7 +25,7 @@ describe ScheduleToArchiveLegacyTraces, :migration do create_legacy_trace(@build_running, 'This job is not done yet') end - it 'correctly archive legacy traces' do + it 'correctly archive legacy traces', :sidekiq_might_not_need_inline do expect(job_artifacts.count).to eq(0) expect(File.exist?(legacy_trace_path(@build_success))).to be_truthy expect(File.exist?(legacy_trace_path(@build_failed))).to be_truthy |