diff options
Diffstat (limited to 'spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb | 57 |
1 files changed, 5 insertions, 52 deletions
diff --git a/spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb b/spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb index e5a8143fcc3..f94a40c93e1 100644 --- a/spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb +++ b/spec/lib/gitlab/database/no_cross_db_foreign_keys_spec.rb @@ -3,59 +3,12 @@ require 'spec_helper' RSpec.describe 'cross-database foreign keys' do - # TODO: We are trying to empty out this list in - # https://gitlab.com/groups/gitlab-org/-/epics/7249 . Once we are done we can - # keep this test and assert that there are no cross-db foreign keys. We - # should not be adding anything to this list but should instead only add new - # loose foreign keys - # https://docs.gitlab.com/ee/development/database/loose_foreign_keys.html . + # Since we don't expect to have any cross-database foreign keys + # this is empty. If we will have an entry like + # `ci_daily_build_group_report_results.project_id` + # should be added. let(:allowed_cross_database_foreign_keys) do - %w( - ci_build_report_results.project_id - ci_builds.project_id - ci_builds_metadata.project_id - ci_daily_build_group_report_results.group_id - ci_daily_build_group_report_results.project_id - ci_freeze_periods.project_id - ci_job_artifacts.project_id - ci_job_token_project_scope_links.added_by_id - ci_job_token_project_scope_links.source_project_id - ci_job_token_project_scope_links.target_project_id - ci_pending_builds.namespace_id - ci_pending_builds.project_id - ci_pipeline_schedules.owner_id - ci_pipeline_schedules.project_id - ci_pipelines.merge_request_id - ci_pipelines.project_id - ci_project_monthly_usages.project_id - ci_refs.project_id - ci_resource_groups.project_id - ci_runner_namespaces.namespace_id - ci_runner_projects.project_id - ci_running_builds.project_id - ci_sources_pipelines.project_id - ci_sources_pipelines.source_project_id - ci_sources_projects.source_project_id - ci_stages.project_id - ci_subscriptions_projects.downstream_project_id - ci_subscriptions_projects.upstream_project_id - ci_triggers.owner_id - ci_triggers.project_id - ci_unit_tests.project_id - ci_variables.project_id - dast_profiles_pipelines.ci_pipeline_id - dast_scanner_profiles_builds.ci_build_id - dast_site_profiles_builds.ci_build_id - dast_site_profiles_pipelines.ci_pipeline_id - external_pull_requests.project_id - merge_requests.head_pipeline_id - merge_trains.pipeline_id - requirements_management_test_reports.build_id - security_scans.build_id - vulnerability_feedback.pipeline_id - vulnerability_occurrence_pipelines.pipeline_id - vulnerability_statistics.latest_pipeline_id - ).freeze + %w[].freeze end def foreign_keys_for(table_name) |