Commit ba216177 authored by Oghenerukevwe Kofi's avatar Oghenerukevwe Kofi Committed by Dmitry Gruzd

Issue 272995 [RUN AS-IF-FOSS]

parent 3ca021ae
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20191125114345_add_admin_mode_protected_path.rb')
require_migration!('add_admin_mode_protected_path')
RSpec.describe AddAdminModeProtectedPath do
subject(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191204114127_delete_legacy_triggers.rb')
require_migration!('delete_legacy_triggers')
RSpec.describe DeleteLegacyTriggers, schema: 2019_11_25_140458 do
let(:ci_trigger_table) { table(:ci_triggers) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200107172020_add_timestamp_softwarelicensespolicy.rb')
require_migration!('add_timestamp_softwarelicensespolicy')
RSpec.describe AddTimestampSoftwarelicensespolicy do
let(:software_licenses_policy) { table(:software_license_policies) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200122123016_backfill_project_settings.rb')
require_migration!('backfill_project_settings')
RSpec.describe BackfillProjectSettings, :sidekiq, schema: 20200114113341 do
let(:projects) { table(:projects) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200123155929_remove_invalid_jira_data.rb')
require_migration!('remove_invalid_jira_data')
RSpec.describe RemoveInvalidJiraData do
let(:jira_tracker_data) { table(:jira_tracker_data) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200127090233_remove_invalid_issue_tracker_data.rb')
require_migration!('remove_invalid_issue_tracker_data')
RSpec.describe RemoveInvalidIssueTrackerData do
let(:issue_tracker_data) { table(:issue_tracker_data) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200130145430_reschedule_migrate_issue_trackers_data.rb')
require_migration!('reschedule_migrate_issue_trackers_data')
RSpec.describe RescheduleMigrateIssueTrackersData do
let(:services) { table(:services) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200313203550_remove_orphaned_chat_names.rb')
require_migration!('remove_orphaned_chat_names')
RSpec.describe RemoveOrphanedChatNames, schema: 20200313202430 do
let(:projects) { table(:projects) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200406102120_backfill_deployment_clusters_from_deployments.rb')
require_migration!('backfill_deployment_clusters_from_deployments')
RSpec.describe BackfillDeploymentClustersFromDeployments, :migration, :sidekiq, schema: 20200227140242 do
describe '#up' do
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200511145545_change_variable_interpolation_format_in_common_metrics')
require_migration!('change_variable_interpolation_format_in_common_metrics')
RSpec.describe ChangeVariableInterpolationFormatInCommonMetrics, :migration do
let(:prometheus_metrics) { table(:prometheus_metrics) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200526115436_dedup_mr_metrics')
require_migration!('dedup_mr_metrics')
RSpec.describe DedupMrMetrics, :migration, schema: 20200526013844 do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200526231421_update_index_approval_rule_name_for_code_owners_rule_type.rb')
require_migration!('update_index_approval_rule_name_for_code_owners_rule_type')
RSpec.describe UpdateIndexApprovalRuleNameForCodeOwnersRuleType do
let(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200703125016_backfill_namespace_settings.rb')
require_migration!('backfill_namespace_settings')
RSpec.describe BackfillNamespaceSettings, :sidekiq, schema: 20200703124823 do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200706035141_adjust_unique_index_alert_management_alerts.rb')
require_migration!('adjust_unique_index_alert_management_alerts')
RSpec.describe AdjustUniqueIndexAlertManagementAlerts, :migration do
let(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200728080250_replace_unique_index_on_cycle_analytics_stages.rb')
require_migration!('replace_unique_index_on_cycle_analytics_stages')
RSpec.describe ReplaceUniqueIndexOnCycleAnalyticsStages, :migration, schema: 20200728080250 do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200728182311_add_o_auth_paths_to_protected_paths.rb')
require_migration!('add_o_auth_paths_to_protected_paths')
RSpec.describe AddOAuthPathsToProtectedPaths do
subject(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200811130433_create_missing_vulnerabilities_issue_links.rb')
require_migration!('create_missing_vulnerabilities_issue_links')
RSpec.describe CreateMissingVulnerabilitiesIssueLinks, :migration do
let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200915044225_schedule_migration_to_hashed_storage.rb')
require_migration!('schedule_migration_to_hashed_storage')
RSpec.describe ScheduleMigrationToHashedStorage, :sidekiq do
describe '#up' do
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200929052138_create_initial_versions_for_pre_versioning_terraform_states.rb')
require_migration!('create_initial_versions_for_pre_versioning_terraform_states')
RSpec.describe CreateInitialVersionsForPreVersioningTerraformStates do
let(:namespace) { table(:namespaces).create!(name: 'terraform', path: 'terraform') }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20201014205300_drop_backfill_jira_tracker_deployment_type_jobs.rb')
require_migration!('drop_backfill_jira_tracker_deployment_type_jobs')
RSpec.describe DropBackfillJiraTrackerDeploymentTypeJobs, :sidekiq, :redis, schema: 2020_10_14_205300 do
subject(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20201027002551_migrate_services_to_http_integrations.rb')
require_migration!('migrate_services_to_http_integrations')
RSpec.describe MigrateServicesToHttpIntegrations do
let!(:namespace) { table(:namespaces).create!(name: 'namespace', path: 'namespace') }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20201028182809_backfill_jira_tracker_deployment_type2.rb')
require_migration!('backfill_jira_tracker_deployment_type2')
RSpec.describe BackfillJiraTrackerDeploymentType2, :sidekiq, schema: 20201028182809 do
let(:services) { table(:services) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20201110161542_cleanup_transfered_projects_shared_runners.rb')
require_migration!('cleanup_transfered_projects_shared_runners')
RSpec.describe CleanupTransferedProjectsSharedRunners, :sidekiq, schema: 20201110161542 do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20201112130710_schedule_remove_duplicate_vulnerabilities_findings.rb')
require_migration!('schedule_remove_duplicate_vulnerabilities_findings')
RSpec.describe ScheduleRemoveDuplicateVulnerabilitiesFindings, :migration do
let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20201112130715_schedule_recalculate_uuid_on_vulnerabilities_occurrences.rb')
require_migration!('schedule_recalculate_uuid_on_vulnerabilities_occurrences')
RSpec.describe ScheduleRecalculateUuidOnVulnerabilitiesOccurrences, :migration do
let(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210112143418_remove_duplicate_services2.rb')
require_migration!('remove_duplicate_services2')
RSpec.describe RemoveDuplicateServices2 do
let_it_be(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210119122354_alter_vsa_issue_first_mentioned_in_commit_value.rb')
require_migration!('alter_vsa_issue_first_mentioned_in_commit_value')
RSpec.describe AlterVsaIssueFirstMentionedInCommitValue, schema: 20210114033715 do
let(:group_stages) { table(:analytics_cycle_analytics_group_stages) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210205174154_remove_bad_dependency_proxy_manifests.rb')
require_migration!('remove_bad_dependency_proxy_manifests')
RSpec.describe RemoveBadDependencyProxyManifests, schema: 20210128140157 do
let_it_be(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210210093901_backfill_updated_at_after_repository_storage_move.rb')
require_migration!('backfill_updated_at_after_repository_storage_move')
RSpec.describe BackfillUpdatedAtAfterRepositoryStorageMove, :sidekiq do
let_it_be(:projects) { table(:projects) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210226141517_dedup_issue_metrics.rb')
require_migration!('dedup_issue_metrics')
RSpec.describe DedupIssueMetrics, :migration, schema: 20210205104425 do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210406144743_backfill_total_tuple_count_for_batched_migrations.rb')
require_migration!('backfill_total_tuple_count_for_batched_migrations')
RSpec.describe BackfillTotalTupleCountForBatchedMigrations, :migration, schema: 20210406140057 do
let_it_be(:table_name) { 'projects' }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210413132500_reschedule_artifact_expiry_backfill_again.rb')
require_migration!('reschedule_artifact_expiry_backfill_again')
RSpec.describe RescheduleArtifactExpiryBackfillAgain, :migration do
let(:migration_class) { Gitlab::BackgroundMigration::BackfillArtifactExpiryDate }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210421163509_schedule_update_jira_tracker_data_deployment_type_based_on_url.rb')
require_migration!('schedule_update_jira_tracker_data_deployment_type_based_on_url')
RSpec.describe ScheduleUpdateJiraTrackerDataDeploymentTypeBasedOnUrl, :migration do
let(:services_table) { table(:services) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210423160427_schedule_drop_invalid_vulnerabilities.rb')
require_migration!('schedule_drop_invalid_vulnerabilities')
RSpec.describe ScheduleDropInvalidVulnerabilities, :migration do
let_it_be(:namespace) { table(:namespaces).create!(name: 'user', path: 'user') }
......
......@@ -2,7 +2,7 @@
#
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210430134202_copy_adoption_snapshot_namespace.rb')
require_migration!('copy_adoption_snapshot_namespace')
RSpec.describe CopyAdoptionSnapshotNamespace, :migration, schema: 20210430124630 do
let(:namespaces_table) { table(:namespaces) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210430135954_copy_adoption_segments_namespace.rb')
require_migration!('copy_adoption_segments_namespace')
RSpec.describe CopyAdoptionSegmentsNamespace, :migration do
let(:namespaces_table) { table(:namespaces) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20210503105845_add_project_value_stream_id_to_project_stages.rb')
require_migration!('add_project_value_stream_id_to_project_stages')
RSpec.describe AddProjectValueStreamIdToProjectStages, schema: 20210503105022 do
let(:stages) { table(:analytics_cycle_analytics_project_stages) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210511142748_schedule_drop_invalid_vulnerabilities2.rb')
require_migration!('schedule_drop_invalid_vulnerabilities2')
RSpec.describe ScheduleDropInvalidVulnerabilities2, :migration do
let_it_be(:background_migration_jobs) { table(:background_migration_jobs) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210601073400_fix_total_stage_in_vsa.rb')
require_migration!('fix_total_stage_in_vsa')
RSpec.describe FixTotalStageInVsa, :migration, schema: 20210518001450 do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20191023152913_add_default_and_free_plans.rb')
require_migration!('add_default_and_free_plans')
RSpec.describe AddDefaultAndFreePlans do
describe 'migrate' do
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200701070435_add_default_value_stream_to_groups_with_group_stages.rb')
require_migration!
RSpec.describe AddDefaultValueStreamToGroupsWithGroupStages, schema: 20200624142207 do
let(:groups) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200122161638_add_deploy_token_type_to_deploy_tokens.rb')
require_migration!
RSpec.describe AddDeployTokenTypeToDeployTokens do
let(:deploy_tokens) { table(:deploy_tokens) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200609212701_add_incident_settings_to_all_existing_projects.rb')
require_migration!
RSpec.describe AddIncidentSettingsToAllExistingProjects, :migration do
let(:project_incident_management_settings) { table(:project_incident_management_settings) }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210205104425_add_new_post_eoa_plans.rb')
require_migration!
RSpec.describe AddNewPostEoaPlans do
let(:plans) { table(:plans) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200908064229_add_partial_index_to_ci_builds_table_on_user_id_name.rb')
require_migration!
RSpec.describe AddPartialIndexToCiBuildsTableOnUserIdName do
let(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200508203901_add_repository_storages_weighted_to_application_settings.rb')
require_migration!
RSpec.describe AddRepositoryStoragesWeightedToApplicationSettings, :migration do
let(:storages) { { "foo" => {}, "baz" => {} } }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200114112932_add_temporary_partial_index_on_project_id_to_services.rb')
require_migration!
RSpec.describe AddTemporaryPartialIndexOnProjectIdToServices do
let(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190404143330_add_unique_constraint_to_approvals_user_id_and_merge_request_id.rb')
require_migration!
RSpec.describe AddUniqueConstraintToApprovalsUserIdAndMergeRequestId do
let(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20190628185004_backfill_and_add_not_null_constraint_to_released_at_column_on_releases_table.rb')
require_migration!
RSpec.describe BackfillAndAddNotNullConstraintToReleasedAtColumnOnReleasesTable do
let(:releases) { table(:releases) }
......
# frozen_string_literal: true
require 'spec_helper'
require_migration! 'backfill_clusters_integration_prometheus_enabled'
require_migration!
RSpec.describe BackfillClustersIntegrationPrometheusEnabled, :migration do
def create_cluster!(label = rand(2**64).to_s)
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210519220019_backfill_escalation_policies_for_oncall_schedules.rb')
require_migration!
RSpec.describe BackfillEscalationPoliciesForOncallSchedules do
let_it_be(:projects) { table(:projects) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200608072931_backfill_imported_snippet_repositories.rb')
require_migration!
RSpec.describe BackfillImportedSnippetRepositories do
let(:users) { table(:users) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20191213184609_backfill_operations_feature_flags_active.rb')
require_migration!
RSpec.describe BackfillOperationsFeatureFlagsActive do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200117194850_backfill_operations_feature_flags_iid.rb')
require_migration!
RSpec.describe BackfillOperationsFeatureFlagsIid do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20190920194925_backfill_releases_table_updated_at_and_add_not_null_constraints_to_timestamps.rb')
require_migration!
RSpec.describe BackfillReleasesTableUpdatedAtAndAddNotNullConstraintsToTimestamps do
let(:releases) { table(:releases) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200420094444_backfill_snippet_repositories.rb')
require_migration!
RSpec.describe BackfillSnippetRepositories do
let(:users) { table(:users) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200421195234_backfill_status_page_published_incidents.rb')
require_migration!
RSpec.describe BackfillStatusPagePublishedIncidents, :migration do
subject(:migration) { described_class.new }
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20190402150158_backport_enterprise_schema.rb')
require_migration!
RSpec.describe BackportEnterpriseSchema, schema: 20190329085614 do
include MigrationsHelpers
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200602013901_cap_designs_filename_length_to_new_limit')
require_migration!
RSpec.describe CapDesignsFilenameLengthToNewLimit, :migration, schema: 20200528125905 do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20190725012225_change_outbound_local_requests_whitelist_default.rb')
require_migration!
RSpec.describe ChangeOutboundLocalRequestsWhitelistDefault do
let(:application_settings) { table(:application_settings) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20190516155724_change_packages_size_defaults_in_project_statistics.rb')
require_migration!
RSpec.describe ChangePackagesSizeDefaultsInProjectStatistics do
let(:project_statistics) { table(:project_statistics) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20210420012444_change_web_hook_events_default.rb')
require_migration!
RSpec.describe ChangeWebHookEventsDefault do
let(:web_hooks) { table(:web_hooks) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200214085940_clean_grafana_url.rb')
require_migration!
RSpec.describe CleanGrafanaUrl do
let(:application_settings_table) { table(:application_settings) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190313092516_clean_up_noteable_id_for_notes_on_commits.rb')
require_migration!
RSpec.describe CleanUpNoteableIdForNotesOnCommits do
let(:notes) { table(:notes) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210525075724_clean_up_pending_builds_table.rb')
require_migration!
RSpec.describe CleanUpPendingBuildsTable do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200128133510_cleanup_empty_commit_user_mentions')
require_migration!
RSpec.describe CleanupEmptyCommitUserMentions, :migration, :sidekiq do
let(:users) { table(:users) }
......
......@@ -12,8 +12,8 @@
# To solve this problem, use SchemaVersionFinder to set schema one version prior to AddNotNullConstraintToUserOnGroupImportStates
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200907092715_add_not_null_constraint_to_user_on_group_import_states.rb')
require Rails.root.join('db', 'post_migrate', '20200909161624_cleanup_group_import_states_with_null_user_id.rb')
require_migration!('add_not_null_constraint_to_user_on_group_import_states')
require_migration!
RSpec.describe CleanupGroupImportStatesWithNullUserId, :migration,
schema: MigrationHelpers::SchemaVersionFinder.migration_prior(AddNotNullConstraintToUserOnGroupImportStates) do
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20190104182041_cleanup_legacy_artifact_migration.rb')
require_migration!('cleanup_legacy_artifact_migration')
RSpec.describe CleanupLegacyArtifactMigration, :redis do
let(:migration) { spy('migration') }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210513163904_cleanup_move_container_registry_enabled_to_project_feature.rb')
require_migration!('cleanup_move_container_registry_enabled_to_project_feature')
RSpec.describe CleanupMoveContainerRegistryEnabledToProjectFeature, :migration do
let(:namespace) { table(:namespaces).create!(name: 'gitlab', path: 'gitlab-org') }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200427064130_cleanup_optimistic_locking_nulls_pt2_fixed.rb')
require_migration!('cleanup_optimistic_locking_nulls_pt2_fixed')
RSpec.describe CleanupOptimisticLockingNullsPt2Fixed, :migration, schema: 20200219193117 do
test_tables = %w(ci_stages ci_builds ci_pipelines).freeze
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200128210353_cleanup_optimistic_locking_nulls')
require_migration!('cleanup_optimistic_locking_nulls')
RSpec.describe CleanupOptimisticLockingNulls do
let(:epics) { table(:epics) }
......
......@@ -2,8 +2,8 @@
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200511080113_add_projects_foreign_key_to_namespaces.rb')
require Rails.root.join('db', 'post_migrate', '20200511083541_cleanup_projects_with_missing_namespace.rb')
require_migration!('add_projects_foreign_key_to_namespaces')
require_migration!
# In order to test the CleanupProjectsWithMissingNamespace migration, we need
# to first create an orphaned project (one with an invalid namespace_id)
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200907124300_complete_namespace_settings_migration.rb')
require_migration!
RSpec.describe CompleteNamespaceSettingsMigration, :redis do
let(:migration) { spy('migration') }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200713071042_confirm_project_bot_users.rb')
require_migration!
RSpec.describe ConfirmProjectBotUsers, :migration do
let(:users) { table(:users) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200214214934_create_environment_for_self_monitoring_project')
require_migration!
RSpec.describe CreateEnvironmentForSelfMonitoringProject do
let(:application_settings_table) { table(:application_settings) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20201106134950_deduplicate_epic_iids.rb')
require_migration!
RSpec.describe DeduplicateEpicIids, :migration, schema: 20201106082723 do
let(:routes) { table(:routes) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200117194900_delete_internal_ids_where_feature_flags_usage')
require_migration!
RSpec.describe DeleteInternalIdsWhereFeatureFlagsUsage do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200305151736_delete_template_project_services.rb')
require_migration!
RSpec.describe DeleteTemplateProjectServices, :migration do
let(:services) { table(:services) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200304160801_delete_template_services_duplicated_by_type.rb')
require_migration!
RSpec.describe DeleteTemplateServicesDuplicatedByType do
let(:services) { table(:services) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200710102418_delete_user_callout_alerts_moved.rb')
require_migration!
RSpec.describe DeleteUserCalloutAlertsMoved do
let(:users) { table(:users) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200221144534_drop_activate_prometheus_services_background_jobs.rb')
require_migration!
RSpec.describe DropActivatePrometheusServicesBackgroundJobs, :sidekiq, :redis, schema: 2020_02_21_144534 do
subject(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20210205213933_drop_alerts_service_data.rb')
require_migration!
RSpec.describe DropAlertsServiceData do
let_it_be(:alerts_service_data) { table(:alerts_service_data) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200116051619_drop_background_migration_jobs.rb')
require_migration!
RSpec.describe DropBackgroundMigrationJobs, :sidekiq, :redis, schema: 2020_01_16_051619 do
subject(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20191128162854_drop_project_ci_cd_settings_merge_trains_enabled.rb')
require_migration!
RSpec.describe DropProjectCiCdSettingsMergeTrainsEnabled do
let!(:project_ci_cd_setting) { table(:project_ci_cd_settings) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190606175050_encrypt_feature_flags_clients_tokens.rb')
require_migration!
RSpec.describe EncryptFeatureFlagsClientsTokens do
let(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20191120115530_encrypt_plaintext_attributes_on_application_settings.rb')
require_migration!
RSpec.describe EncryptPlaintextAttributesOnApplicationSettings do
let(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190620112608_enqueue_reset_merge_status_second_run.rb')
require_migration!
RSpec.describe EnqueueResetMergeStatusSecondRun do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190528180441_enqueue_reset_merge_status.rb')
require_migration!
RSpec.describe EnqueueResetMergeStatus do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200910170908_ensure_filled_external_diff_store_on_merge_request_diffs.rb')
require_migration!
RSpec.describe EnsureFilledExternalDiffStoreOnMergeRequestDiffs, schema: 20200908095446 do
let!(:merge_request_diffs) { table(:merge_request_diffs) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200915185707_ensure_filled_file_store_on_package_files.rb')
require_migration!
RSpec.describe EnsureFilledFileStoreOnPackageFiles, schema: 20200910175553 do
let!(:packages_package_files) { table(:packages_package_files) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20201104124300_ensure_namespace_settings_creation.rb')
require_migration!
RSpec.describe EnsureNamespaceSettingsCreation do
context 'when there are namespaces without namespace settings' do
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20200831065705_ensure_target_project_id_is_filled.rb')
require_migration!
RSpec.describe EnsureTargetProjectIdIsFilled, schema: 20200827085101 do
let_it_be(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20201026185514_ensure_u2f_registrations_migrated.rb')
require_migration!
RSpec.describe EnsureU2fRegistrationsMigrated, schema: 20201022144501 do
let(:u2f_registrations) { table(:u2f_registrations) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200513235532_fill_file_store_ci_job_artifacts.rb')
require_migration!
RSpec.describe FillFileStoreCiJobArtifacts do
let(:namespaces) { table(:namespaces) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200513234502_fill_file_store_lfs_objects.rb')
require_migration!
RSpec.describe FillFileStoreLfsObjects do
let(:lfs_objects) { table(:lfs_objects) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20191004081520_fill_productivity_analytics_start_date.rb')
require_migration!
RSpec.describe FillProductivityAnalyticsStartDate do
let(:settings_table) { table('application_settings') }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20200513235347_fill_store_uploads.rb')
require_migration!
RSpec.describe FillStoreUploads do
let(:uploads) { table(:uploads) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20191213120427_fix_max_pages_size.rb')
require_migration!
RSpec.describe FixMaxPagesSize do
let(:application_settings) { table(:application_settings) }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20190131122559_fix_null_type_labels')
require_migration!
RSpec.describe FixNullTypeLabels do
let(:migration) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20190604184643_fix_pool_repository_source_project_id.rb')
require_migration!
RSpec.describe FixPoolRepositorySourceProjectId do
let(:projects) { table(:projects) }
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment