Skip to content
代码片段 群组 项目
未验证 提交 178f1d1e 编辑于 作者: Pedro Pombeiro's avatar Pedro Pombeiro 提交者: GitLab
浏览文件

Merge branch 'pedropombeiro/494933/fix-tests-schema' into 'master'

Change gitlab_schema default value in have_scheduled_batched_migration matcher

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/167570



Merged-by: default avatarPedro Pombeiro <noreply@pedro.pombei.ro>
Approved-by: default avatarEva Kadlecová <ekadlecova@gitlab.com>
Approved-by: default avatarBojan Marjanovic <bmarjanovic@gitlab.com>
Approved-by: default avatarEthan Urie <eurie@gitlab.com>
Approved-by: default avatarJarka Košanová <jarka@gitlab.com>
Reviewed-by: default avatarLucas Charles <me@lucascharles.me>
Reviewed-by: default avatarPedro Pombeiro <noreply@pedro.pombei.ro>
Reviewed-by: default avatarEthan Urie <eurie@gitlab.com>
No related branches found
No related tags found
无相关合并请求
显示
39 个添加20 个删除
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe <%= migration_class_name %>, feature_category: :<%= feature_category.to_sym %> do RSpec.describe <%= migration_class_name %>, migration: :gitlab_?, feature_category: :<%= feature_category.to_sym %> do
# let!(:batched_migration) { described_class::MIGRATION } # let!(:batched_migration) { described_class::MIGRATION }
# it 'schedules a new batched migration' do # it 'schedules a new batched migration' do
...@@ -14,6 +14,7 @@ RSpec.describe <%= migration_class_name %>, feature_category: :<%= feature_categ ...@@ -14,6 +14,7 @@ RSpec.describe <%= migration_class_name %>, feature_category: :<%= feature_categ
# migration.after -> { # migration.after -> {
# expect(batched_migration).to have_scheduled_batched_migration( # expect(batched_migration).to have_scheduled_batched_migration(
# gitlab_schema: # :gitlab_main / :gitlab_ci / :gitlab_main_clusterwide / ...
# table_name: :<%= table_name %>, # table_name: :<%= table_name %>,
# column_name: :<%= column_name %>, # column_name: :<%= column_name %>,
# interval: described_class::DELAY_INTERVAL, # interval: described_class::DELAY_INTERVAL,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueMyBatchedMigration, feature_category: :database do RSpec.describe QueueMyBatchedMigration, migration: :gitlab_?, feature_category: :database do
# let!(:batched_migration) { described_class::MIGRATION } # let!(:batched_migration) { described_class::MIGRATION }
# it 'schedules a new batched migration' do # it 'schedules a new batched migration' do
...@@ -14,6 +14,7 @@ RSpec.describe QueueMyBatchedMigration, feature_category: :database do ...@@ -14,6 +14,7 @@ RSpec.describe QueueMyBatchedMigration, feature_category: :database do
# migration.after -> { # migration.after -> {
# expect(batched_migration).to have_scheduled_batched_migration( # expect(batched_migration).to have_scheduled_batched_migration(
# gitlab_schema: # :gitlab_main / :gitlab_ci / :gitlab_main_clusterwide / ...
# table_name: :projects, # table_name: :projects,
# column_name: :id, # column_name: :id,
# interval: described_class::DELAY_INTERVAL, # interval: described_class::DELAY_INTERVAL,
......
...@@ -195,6 +195,7 @@ ...@@ -195,6 +195,7 @@
before do before do
allow(migration).to receive(:puts) allow(migration).to receive(:puts)
allow(described_class).to receive(:allowed_gitlab_schemas).and_return([:gitlab_main])
migration.create_table source_table do |t| migration.create_table source_table do |t|
t.string :name, null: false t.string :name, null: false
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillSbomOccurrencesTraversalIdsAndArchived, feature_category: :dependency_management do RSpec.describe QueueBackfillSbomOccurrencesTraversalIdsAndArchived, migration: :gitlab_sec,
feature_category: :dependency_management do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueUpdateSbomComponentsNameBasedOnPep503, feature_category: :software_composition_analysis do RSpec.describe QueueUpdateSbomComponentsNameBasedOnPep503, migration: :gitlab_sec,
feature_category: :software_composition_analysis do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackupAndRemoveNotesWithNullNoteableType, feature_category: :team_planning do RSpec.describe QueueBackupAndRemoveNotesWithNullNoteableType, migration: :gitlab_main_cell,
feature_category: :team_planning do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueUpdateSbomOccurrencesComponentNameBasedOnPep503, feature_category: :software_composition_analysis do RSpec.describe QueueUpdateSbomOccurrencesComponentNameBasedOnPep503, migration: :gitlab_sec,
feature_category: :software_composition_analysis do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillDeploymentApprovalsProjectId, feature_category: :continuous_delivery do RSpec.describe QueueBackfillDeploymentApprovalsProjectId, migration: :gitlab_main_cell,
feature_category: :continuous_delivery do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillApprovalMergeRequestRulesProjectId, feature_category: :code_review_workflow do RSpec.describe QueueBackfillApprovalMergeRequestRulesProjectId, migration: :gitlab_main_cell,
feature_category: :code_review_workflow do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillApprovalProjectRulesUsersProjectId, feature_category: :source_code_management do RSpec.describe QueueBackfillApprovalProjectRulesUsersProjectId, migration: :gitlab_main_cell,
feature_category: :source_code_management do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueMigrateOsSbomOccurrencesToComponentsWithoutPrefix, feature_category: :software_composition_analysis do RSpec.describe QueueMigrateOsSbomOccurrencesToComponentsWithoutPrefix, migration: :gitlab_sec,
feature_category: :software_composition_analysis do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillDesignManagementDesignsNamespaceId, feature_category: :design_management do RSpec.describe QueueBackfillDesignManagementDesignsNamespaceId, migration: :gitlab_main_cell,
feature_category: :design_management do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillBoardsEpicBoardLabelsGroupId, feature_category: :portfolio_management do RSpec.describe QueueBackfillBoardsEpicBoardLabelsGroupId, migration: :gitlab_main_cell,
feature_category: :portfolio_management do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillBoardsEpicListsGroupId, feature_category: :portfolio_management do RSpec.describe QueueBackfillBoardsEpicListsGroupId, migration: :gitlab_main_cell,
feature_category: :portfolio_management do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillWikiPageSlugsProjectId, feature_category: :wiki do RSpec.describe QueueBackfillWikiPageSlugsProjectId, migration: :gitlab_main_cell, feature_category: :wiki do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillPackagesBuildInfosProjectId, feature_category: :package_registry do RSpec.describe QueueBackfillPackagesBuildInfosProjectId, migration: :gitlab_main_cell,
feature_category: :package_registry do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillDoraDailyMetricsProjectId, feature_category: :continuous_delivery do RSpec.describe QueueBackfillDoraDailyMetricsProjectId, migration: :gitlab_main_cell,
feature_category: :continuous_delivery do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillDesignManagementVersionsNamespaceId, feature_category: :design_management do RSpec.describe QueueBackfillDesignManagementVersionsNamespaceId, migration: :gitlab_main_cell,
feature_category: :design_management do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillOrDropCiPipelineOnProjectId, migration: :gitlab_ci, feature_category: :continuous_integration do RSpec.describe QueueBackfillOrDropCiPipelineOnProjectId, migration: :gitlab_ci,
feature_category: :continuous_integration do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
require 'spec_helper' require 'spec_helper'
require_migration! require_migration!
RSpec.describe QueueBackfillDastPreScanVerificationsProjectId, feature_category: :dynamic_application_security_testing do RSpec.describe QueueBackfillDastPreScanVerificationsProjectId, migration: :gitlab_sec,
feature_category: :dynamic_application_security_testing do
let!(:batched_migration) { described_class::MIGRATION } let!(:batched_migration) { described_class::MIGRATION }
it 'schedules a new batched migration' do it 'schedules a new batched migration' do
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
interval: described_class::DELAY_INTERVAL, interval: described_class::DELAY_INTERVAL,
batch_size: described_class::BATCH_SIZE, batch_size: described_class::BATCH_SIZE,
sub_batch_size: described_class::SUB_BATCH_SIZE, sub_batch_size: described_class::SUB_BATCH_SIZE,
gitlab_schema: :gitlab_main_cell, gitlab_schema: :gitlab_sec,
job_arguments: [ job_arguments: [
:project_id, :project_id,
:dast_profiles, :dast_profiles,
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册