Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8e2624c5
Commit
8e2624c5
authored
Mar 09, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Automatically set the :migration metadata for migration specs
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
f5c7d8eb
Changes
190
Show whitespace changes
Inline
Side-by-side
Showing
190 changed files
with
202 additions
and
197 deletions
+202
-197
doc/development/testing_guide/testing_migrations_guide.md
doc/development/testing_guide/testing_migrations_guide.md
+4
-4
ee/spec/lib/ee/gitlab/background_migration/backfill_version_data_from_gitaly_spec.rb
...round_migration/backfill_version_data_from_gitaly_spec.rb
+2
-2
ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_check_progress_spec.rb
...migrate_approver_to_approval_rules_check_progress_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_in_batch_spec.rb
...ation/migrate_approver_to_approval_rules_in_batch_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb
...ound_migration/migrate_approver_to_approval_rules_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/background_migration/migrate_security_scans_spec.rb
...itlab/background_migration/migrate_security_scans_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/background_migration/move_epic_issues_after_epics_spec.rb
...background_migration/move_epic_issues_after_epics_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/background_migration/populate_any_approval_rule_for_merge_requests_spec.rb
...ion/populate_any_approval_rule_for_merge_requests_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/background_migration/populate_any_approval_rule_for_projects_spec.rb
...migration/populate_any_approval_rule_for_projects_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/background_migration/prune_orphaned_geo_events_spec.rb
...ab/background_migration/prune_orphaned_geo_events_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/background_migration/remove_undefined_occurrence_severity_level_spec.rb
...ration/remove_undefined_occurrence_severity_level_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/background_migration/update_authorized_keys_file_since_spec.rb
...round_migration/update_authorized_keys_file_since_spec.rb
+1
-1
ee/spec/lib/ee/gitlab/background_migration/update_vulnerability_confidence_spec.rb
...kground_migration/update_vulnerability_confidence_spec.rb
+1
-1
ee/spec/lib/gitlab/background_migration/fix_orphan_promoted_issues_spec.rb
...b/background_migration/fix_orphan_promoted_issues_spec.rb
+1
-1
ee/spec/lib/gitlab/background_migration/user_mentions/create_resource_user_mention_spec.rb
...ration/user_mentions/create_resource_user_mention_spec.rb
+1
-1
ee/spec/lib/gitlab/geo/log_cursor/events/container_repository_updated_event_spec.rb
..._cursor/events/container_repository_updated_event_spec.rb
+1
-1
ee/spec/migrations/add_unique_constraint_to_software_licenses_spec.rb
...ations/add_unique_constraint_to_software_licenses_spec.rb
+1
-1
ee/spec/migrations/backfill_operations_feature_flags_iid_spec.rb
.../migrations/backfill_operations_feature_flags_iid_spec.rb
+1
-1
ee/spec/migrations/backfill_software_licenses_spdx_identifiers_spec.rb
...tions/backfill_software_licenses_spdx_identifiers_spec.rb
+1
-1
ee/spec/migrations/backfill_version_author_and_created_at_spec.rb
...migrations/backfill_version_author_and_created_at_spec.rb
+1
-1
ee/spec/migrations/cleanup_deploy_access_levels_for_removed_groups_spec.rb
...s/cleanup_deploy_access_levels_for_removed_groups_spec.rb
+1
-1
ee/spec/migrations/cleanup_empty_epic_user_mentions_spec.rb
ee/spec/migrations/cleanup_empty_epic_user_mentions_spec.rb
+1
-1
ee/spec/migrations/fix_any_approver_rule_for_projects_spec.rb
...pec/migrations/fix_any_approver_rule_for_projects_spec.rb
+1
-1
ee/spec/migrations/geo/migrate_ci_job_artifacts_to_separate_registry_spec.rb
...geo/migrate_ci_job_artifacts_to_separate_registry_spec.rb
+1
-1
ee/spec/migrations/geo/migrate_lfs_objects_to_separate_registry_spec.rb
...ions/geo/migrate_lfs_objects_to_separate_registry_spec.rb
+1
-1
ee/spec/migrations/geo/set_resync_flag_for_retried_projects_spec.rb
...grations/geo/set_resync_flag_for_retried_projects_spec.rb
+1
-1
ee/spec/migrations/migrate_design_notes_mentions_to_db_spec.rb
...ec/migrations/migrate_design_notes_mentions_to_db_spec.rb
+1
-1
ee/spec/migrations/migrate_epic_mentions_to_db_spec.rb
ee/spec/migrations/migrate_epic_mentions_to_db_spec.rb
+1
-1
ee/spec/migrations/migrate_epic_notes_mentions_to_db_spec.rb
ee/spec/migrations/migrate_epic_notes_mentions_to_db_spec.rb
+1
-1
ee/spec/migrations/nullify_feature_flag_plaintext_tokens_spec.rb
.../migrations/nullify_feature_flag_plaintext_tokens_spec.rb
+1
-1
ee/spec/migrations/remove_creations_in_gitlab_subscription_histories_spec.rb
...remove_creations_in_gitlab_subscription_histories_spec.rb
+1
-1
ee/spec/migrations/schedule_fix_orphan_promoted_issues_spec.rb
...ec/migrations/schedule_fix_orphan_promoted_issues_spec.rb
+1
-1
ee/spec/migrations/schedule_merge_request_any_approval_rule_migration_spec.rb
...chedule_merge_request_any_approval_rule_migration_spec.rb
+1
-1
ee/spec/migrations/schedule_project_any_approval_rule_migration_spec.rb
...ions/schedule_project_any_approval_rule_migration_spec.rb
+1
-1
ee/spec/migrations/set_report_type_for_vulnerabilities_spec.rb
...ec/migrations/set_report_type_for_vulnerabilities_spec.rb
+1
-1
ee/spec/migrations/set_resolved_state_on_vulnerabilities_spec.rb
.../migrations/set_resolved_state_on_vulnerabilities_spec.rb
+1
-1
ee/spec/migrations/update_cs_vulnerability_confidence_column_spec.rb
...rations/update_cs_vulnerability_confidence_column_spec.rb
+1
-1
ee/spec/migrations/update_occurrence_severity_column_spec.rb
ee/spec/migrations/update_occurrence_severity_column_spec.rb
+1
-1
spec/lib/gitlab/background_migration/add_merge_request_diff_commits_count_spec.rb
...nd_migration/add_merge_request_diff_commits_count_spec.rb
+1
-1
spec/lib/gitlab/background_migration/archive_legacy_traces_spec.rb
...gitlab/background_migration/archive_legacy_traces_spec.rb
+1
-1
spec/lib/gitlab/background_migration/backfill_hashed_project_repositories_spec.rb
...nd_migration/backfill_hashed_project_repositories_spec.rb
+1
-1
spec/lib/gitlab/background_migration/backfill_legacy_project_repositories_spec.rb
...nd_migration/backfill_legacy_project_repositories_spec.rb
+1
-1
spec/lib/gitlab/background_migration/backfill_project_fullpath_in_repo_config_spec.rb
...igration/backfill_project_fullpath_in_repo_config_spec.rb
+1
-1
spec/lib/gitlab/background_migration/backfill_project_repositories_spec.rb
...ackground_migration/backfill_project_repositories_spec.rb
+1
-1
spec/lib/gitlab/background_migration/backfill_project_settings_spec.rb
...ab/background_migration/backfill_project_settings_spec.rb
+1
-1
spec/lib/gitlab/background_migration/digest_column_spec.rb
spec/lib/gitlab/background_migration/digest_column_spec.rb
+1
-1
spec/lib/gitlab/background_migration/encrypt_columns_spec.rb
spec/lib/gitlab/background_migration/encrypt_columns_spec.rb
+1
-1
spec/lib/gitlab/background_migration/encrypt_runners_tokens_spec.rb
...itlab/background_migration/encrypt_runners_tokens_spec.rb
+1
-1
spec/lib/gitlab/background_migration/fix_cross_project_label_links_spec.rb
...ackground_migration/fix_cross_project_label_links_spec.rb
+1
-1
spec/lib/gitlab/background_migration/fix_projects_without_project_feature_spec.rb
...nd_migration/fix_projects_without_project_feature_spec.rb
+1
-1
spec/lib/gitlab/background_migration/fix_promoted_epics_discussion_ids_spec.rb
...round_migration/fix_promoted_epics_discussion_ids_spec.rb
+1
-1
spec/lib/gitlab/background_migration/fix_user_namespace_names_spec.rb
...lab/background_migration/fix_user_namespace_names_spec.rb
+1
-1
spec/lib/gitlab/background_migration/fix_user_project_route_names_spec.rb
...background_migration/fix_user_project_route_names_spec.rb
+1
-1
spec/lib/gitlab/background_migration/legacy_upload_mover_spec.rb
...b/gitlab/background_migration/legacy_upload_mover_spec.rb
+1
-1
spec/lib/gitlab/background_migration/legacy_uploads_migrator_spec.rb
...tlab/background_migration/legacy_uploads_migrator_spec.rb
+1
-1
spec/lib/gitlab/background_migration/merge_request_assignees_migration_progress_check_spec.rb
.../merge_request_assignees_migration_progress_check_spec.rb
+1
-1
spec/lib/gitlab/background_migration/migrate_build_stage_spec.rb
...b/gitlab/background_migration/migrate_build_stage_spec.rb
+1
-1
spec/lib/gitlab/background_migration/migrate_fingerprint_sha256_within_keys_spec.rb
..._migration/migrate_fingerprint_sha256_within_keys_spec.rb
+1
-1
spec/lib/gitlab/background_migration/migrate_issue_trackers_sensitive_data_spec.rb
...d_migration/migrate_issue_trackers_sensitive_data_spec.rb
+1
-1
spec/lib/gitlab/background_migration/migrate_legacy_artifacts_spec.rb
...lab/background_migration/migrate_legacy_artifacts_spec.rb
+1
-1
spec/lib/gitlab/background_migration/migrate_null_private_profile_to_false_spec.rb
...d_migration/migrate_null_private_profile_to_false_spec.rb
+1
-1
spec/lib/gitlab/background_migration/migrate_pages_metadata_spec.rb
...itlab/background_migration/migrate_pages_metadata_spec.rb
+1
-1
spec/lib/gitlab/background_migration/migrate_stage_index_spec.rb
...b/gitlab/background_migration/migrate_stage_index_spec.rb
+1
-1
spec/lib/gitlab/background_migration/populate_cluster_kubernetes_namespace_table_spec.rb
...ation/populate_cluster_kubernetes_namespace_table_spec.rb
+1
-1
spec/lib/gitlab/background_migration/populate_merge_request_assignees_table_spec.rb
..._migration/populate_merge_request_assignees_table_spec.rb
+1
-1
spec/lib/gitlab/background_migration/populate_untracked_uploads_dependencies/untracked_file_spec.rb
...ate_untracked_uploads_dependencies/untracked_file_spec.rb
+1
-1
spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb
...b/background_migration/populate_untracked_uploads_spec.rb
+1
-1
spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb
...ab/background_migration/prepare_untracked_uploads_spec.rb
+1
-1
spec/lib/gitlab/background_migration/recalculate_project_authorizations_spec.rb
...ound_migration/recalculate_project_authorizations_spec.rb
+1
-1
spec/lib/gitlab/background_migration/recalculate_project_authorizations_with_min_max_user_id_spec.rb
...ulate_project_authorizations_with_min_max_user_id_spec.rb
+1
-1
spec/lib/gitlab/background_migration/remove_restricted_todos_spec.rb
...tlab/background_migration/remove_restricted_todos_spec.rb
+1
-1
spec/lib/gitlab/background_migration/reset_merge_status_spec.rb
...ib/gitlab/background_migration/reset_merge_status_spec.rb
+1
-1
spec/lib/gitlab/background_migration/schedule_calculate_wiki_sizes_spec.rb
...ackground_migration/schedule_calculate_wiki_sizes_spec.rb
+1
-1
spec/lib/gitlab/background_migration/set_confidential_note_events_on_services_spec.rb
...igration/set_confidential_note_events_on_services_spec.rb
+1
-1
spec/lib/gitlab/background_migration/set_confidential_note_events_on_webhooks_spec.rb
...igration/set_confidential_note_events_on_webhooks_spec.rb
+1
-1
spec/lib/gitlab/background_migration/update_existing_subgroup_to_match_visibility_level_of_parent_spec.rb
...ting_subgroup_to_match_visibility_level_of_parent_spec.rb
+1
-1
spec/lib/gitlab/background_migration_spec.rb
spec/lib/gitlab/background_migration_spec.rb
+1
-1
spec/migrations/20190924152703_migrate_issue_trackers_data_spec.rb
...ations/20190924152703_migrate_issue_trackers_data_spec.rb
+1
-1
spec/migrations/20191015154408_drop_merge_requests_require_code_owner_approval_from_projects_spec.rb
...equests_require_code_owner_approval_from_projects_spec.rb
+1
-1
spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb
...ions/20191125114345_add_admin_mode_protected_path_spec.rb
+1
-1
spec/migrations/20191204114127_delete_legacy_triggers_spec.rb
.../migrations/20191204114127_delete_legacy_triggers_spec.rb
+1
-1
spec/migrations/20200107172020_add_timestamp_softwarelicensespolicy_spec.rb
...200107172020_add_timestamp_softwarelicensespolicy_spec.rb
+1
-1
spec/migrations/20200122123016_backfill_project_settings_spec.rb
...grations/20200122123016_backfill_project_settings_spec.rb
+1
-1
spec/migrations/20200123155929_remove_invalid_jira_data_spec.rb
...igrations/20200123155929_remove_invalid_jira_data_spec.rb
+1
-1
spec/migrations/20200127090233_remove_invalid_issue_tracker_data_spec.rb
.../20200127090233_remove_invalid_issue_tracker_data_spec.rb
+1
-1
spec/migrations/20200130145430_reschedule_migrate_issue_trackers_data_spec.rb
...0130145430_reschedule_migrate_issue_trackers_data_spec.rb
+1
-1
spec/migrations/active_record/schedule_set_confidential_note_events_on_services_spec.rb
...schedule_set_confidential_note_events_on_services_spec.rb
+1
-1
spec/migrations/active_record/schema_spec.rb
spec/migrations/active_record/schema_spec.rb
+1
-1
spec/migrations/add_default_and_free_plans_spec.rb
spec/migrations/add_default_and_free_plans_spec.rb
+1
-1
spec/migrations/add_deploy_token_type_to_deploy_tokens_spec.rb
...migrations/add_deploy_token_type_to_deploy_tokens_spec.rb
+1
-1
spec/migrations/add_foreign_key_from_notification_settings_to_users_spec.rb
...d_foreign_key_from_notification_settings_to_users_spec.rb
+1
-1
spec/migrations/add_foreign_keys_to_todos_spec.rb
spec/migrations/add_foreign_keys_to_todos_spec.rb
+1
-1
spec/migrations/add_not_null_constraint_to_project_mirror_data_foreign_key_spec.rb
...ull_constraint_to_project_mirror_data_foreign_key_spec.rb
+1
-1
spec/migrations/add_pages_access_level_to_project_feature_spec.rb
...rations/add_pages_access_level_to_project_feature_spec.rb
+1
-1
spec/migrations/add_pipeline_build_foreign_key_spec.rb
spec/migrations/add_pipeline_build_foreign_key_spec.rb
+1
-1
spec/migrations/add_temporary_partial_index_on_project_id_to_services_spec.rb
...temporary_partial_index_on_project_id_to_services_spec.rb
+1
-1
spec/migrations/add_unique_constraint_to_approvals_user_id_and_merge_request_id_spec.rb
...straint_to_approvals_user_id_and_merge_request_id_spec.rb
+1
-1
spec/migrations/add_unique_constraint_to_project_features_project_id_spec.rb
..._unique_constraint_to_project_features_project_id_spec.rb
+1
-1
spec/migrations/assure_commits_count_for_merge_request_diff_spec.rb
...tions/assure_commits_count_for_merge_request_diff_spec.rb
+1
-1
spec/migrations/backfill_and_add_not_null_constraint_to_released_at_column_on_releases_table_spec.rb
...onstraint_to_released_at_column_on_releases_table_spec.rb
+1
-1
spec/migrations/backfill_operations_feature_flags_active_spec.rb
...grations/backfill_operations_feature_flags_active_spec.rb
+1
-1
spec/migrations/backfill_operations_feature_flags_iid_spec.rb
.../migrations/backfill_operations_feature_flags_iid_spec.rb
+1
-1
spec/migrations/backfill_releases_name_with_tag_name_spec.rb
spec/migrations/backfill_releases_name_with_tag_name_spec.rb
+1
-1
spec/migrations/backfill_releases_table_updated_at_and_add_not_null_constraints_to_timestamps_spec.rb
...ted_at_and_add_not_null_constraints_to_timestamps_spec.rb
+1
-1
spec/migrations/backfill_store_project_full_path_in_repo_spec.rb
...grations/backfill_store_project_full_path_in_repo_spec.rb
+1
-1
spec/migrations/backport_enterprise_schema_spec.rb
spec/migrations/backport_enterprise_schema_spec.rb
+1
-1
spec/migrations/change_default_value_for_dsa_key_restriction_spec.rb
...ions/change_default_value_for_dsa_key_restriction_spec.rb
+1
-1
spec/migrations/change_outbound_local_requests_whitelist_default_spec.rb
.../change_outbound_local_requests_whitelist_default_spec.rb
+1
-1
spec/migrations/change_packages_size_defaults_in_project_statistics_spec.rb
...ange_packages_size_defaults_in_project_statistics_spec.rb
+1
-1
spec/migrations/clean_grafana_url_spec.rb
spec/migrations/clean_grafana_url_spec.rb
+1
-1
spec/migrations/clean_up_noteable_id_for_notes_on_commits_spec.rb
...rations/clean_up_noteable_id_for_notes_on_commits_spec.rb
+1
-1
spec/migrations/cleanup_build_stage_migration_spec.rb
spec/migrations/cleanup_build_stage_migration_spec.rb
+1
-1
spec/migrations/cleanup_environments_external_url_spec.rb
spec/migrations/cleanup_environments_external_url_spec.rb
+1
-1
spec/migrations/cleanup_legacy_artifact_migration_spec.rb
spec/migrations/cleanup_legacy_artifact_migration_spec.rb
+1
-1
spec/migrations/cleanup_optimistic_locking_nulls_spec.rb
spec/migrations/cleanup_optimistic_locking_nulls_spec.rb
+1
-1
spec/migrations/cleanup_stages_position_migration_spec.rb
spec/migrations/cleanup_stages_position_migration_spec.rb
+1
-1
spec/migrations/create_environment_for_self_monitoring_project_spec.rb
...ns/create_environment_for_self_monitoring_project_spec.rb
+1
-1
spec/migrations/create_missing_namespace_for_internal_users_spec.rb
...tions/create_missing_namespace_for_internal_users_spec.rb
+1
-1
spec/migrations/delete_internal_ids_where_feature_flags_usage_spec.rb
...ons/delete_internal_ids_where_feature_flags_usage_spec.rb
+1
-1
spec/migrations/delete_template_services_duplicated_by_type_spec.rb
...tions/delete_template_services_duplicated_by_type_spec.rb
+1
-1
spec/migrations/drop_activate_prometheus_services_background_jobs_spec.rb
...drop_activate_prometheus_services_background_jobs_spec.rb
+1
-1
spec/migrations/drop_background_migration_jobs_spec.rb
spec/migrations/drop_background_migration_jobs_spec.rb
+1
-1
spec/migrations/drop_duplicate_protected_tags_spec.rb
spec/migrations/drop_duplicate_protected_tags_spec.rb
+1
-1
spec/migrations/drop_project_ci_cd_settings_merge_trains_enabled_spec.rb
.../drop_project_ci_cd_settings_merge_trains_enabled_spec.rb
+1
-1
spec/migrations/encrypt_deploy_tokens_tokens_spec.rb
spec/migrations/encrypt_deploy_tokens_tokens_spec.rb
+1
-1
spec/migrations/encrypt_feature_flags_clients_tokens_spec.rb
spec/migrations/encrypt_feature_flags_clients_tokens_spec.rb
+1
-1
spec/migrations/encrypt_plaintext_attributes_on_application_settings_spec.rb
...rypt_plaintext_attributes_on_application_settings_spec.rb
+1
-1
spec/migrations/enqueue_reset_merge_status_second_run_spec.rb
.../migrations/enqueue_reset_merge_status_second_run_spec.rb
+1
-1
spec/migrations/enqueue_reset_merge_status_spec.rb
spec/migrations/enqueue_reset_merge_status_spec.rb
+1
-1
spec/migrations/enqueue_verify_pages_domain_workers_spec.rb
spec/migrations/enqueue_verify_pages_domain_workers_spec.rb
+1
-1
spec/migrations/fill_empty_finished_at_in_deployments_spec.rb
.../migrations/fill_empty_finished_at_in_deployments_spec.rb
+1
-1
spec/migrations/fill_file_store_spec.rb
spec/migrations/fill_file_store_spec.rb
+1
-1
spec/migrations/fill_productivity_analytics_start_date_spec.rb
...migrations/fill_productivity_analytics_start_date_spec.rb
+1
-1
spec/migrations/fix_max_pages_size_spec.rb
spec/migrations/fix_max_pages_size_spec.rb
+1
-1
spec/migrations/fix_null_type_labels_spec.rb
spec/migrations/fix_null_type_labels_spec.rb
+1
-1
spec/migrations/fix_pool_repository_source_project_id_spec.rb
.../migrations/fix_pool_repository_source_project_id_spec.rb
+1
-1
spec/migrations/fix_projects_without_project_feature_spec.rb
spec/migrations/fix_projects_without_project_feature_spec.rb
+1
-1
spec/migrations/fix_wrong_pages_access_level_spec.rb
spec/migrations/fix_wrong_pages_access_level_spec.rb
+1
-1
spec/migrations/generate_lets_encrypt_private_key_spec.rb
spec/migrations/generate_lets_encrypt_private_key_spec.rb
+1
-1
spec/migrations/generate_missing_routes_spec.rb
spec/migrations/generate_missing_routes_spec.rb
+1
-1
spec/migrations/import_common_metrics_spec.rb
spec/migrations/import_common_metrics_spec.rb
+1
-1
spec/migrations/insert_project_hooks_plan_limits_spec.rb
spec/migrations/insert_project_hooks_plan_limits_spec.rb
+1
-1
spec/migrations/migrate_auto_dev_ops_domain_to_cluster_domain_spec.rb
...ons/migrate_auto_dev_ops_domain_to_cluster_domain_spec.rb
+1
-1
spec/migrations/migrate_code_owner_approval_status_to_protected_branches_in_batches_spec.rb
..._approval_status_to_protected_branches_in_batches_spec.rb
+1
-1
spec/migrations/migrate_discussion_id_on_promoted_epics_spec.rb
...igrations/migrate_discussion_id_on_promoted_epics_spec.rb
+1
-1
spec/migrations/migrate_forbidden_redirect_uris_spec.rb
spec/migrations/migrate_forbidden_redirect_uris_spec.rb
+1
-1
spec/migrations/migrate_k8s_service_integration_spec.rb
spec/migrations/migrate_k8s_service_integration_spec.rb
+1
-1
spec/migrations/migrate_legacy_artifacts_to_job_artifacts_spec.rb
...rations/migrate_legacy_artifacts_to_job_artifacts_spec.rb
+1
-1
spec/migrations/migrate_legacy_managed_clusters_to_unmanaged_spec.rb
...ions/migrate_legacy_managed_clusters_to_unmanaged_spec.rb
+1
-1
spec/migrations/migrate_managed_clusters_with_no_token_to_unmanaged_spec.rb
...grate_managed_clusters_with_no_token_to_unmanaged_spec.rb
+1
-1
spec/migrations/migrate_null_wiki_access_levels_spec.rb
spec/migrations/migrate_null_wiki_access_levels_spec.rb
+1
-1
spec/migrations/migrate_ops_feature_flags_scopes_target_user_ids_spec.rb
.../migrate_ops_feature_flags_scopes_target_user_ids_spec.rb
+1
-1
spec/migrations/move_limits_from_plans_spec.rb
spec/migrations/move_limits_from_plans_spec.rb
+1
-1
spec/migrations/nullify_users_role_spec.rb
spec/migrations/nullify_users_role_spec.rb
+1
-1
spec/migrations/populate_project_statistics_packages_size_spec.rb
...rations/populate_project_statistics_packages_size_spec.rb
+1
-1
spec/migrations/populate_rule_type_on_approval_merge_request_rules_spec.rb
...opulate_rule_type_on_approval_merge_request_rules_spec.rb
+1
-1
spec/migrations/remove_empty_extern_uid_auth0_identities_spec.rb
...grations/remove_empty_extern_uid_auth0_identities_spec.rb
+1
-1
spec/migrations/remove_empty_github_service_templates_spec.rb
.../migrations/remove_empty_github_service_templates_spec.rb
+1
-1
spec/migrations/remove_packages_deprecated_dependencies_spec.rb
...igrations/remove_packages_deprecated_dependencies_spec.rb
+1
-1
spec/migrations/remove_redundant_pipeline_stages_spec.rb
spec/migrations/remove_redundant_pipeline_stages_spec.rb
+1
-1
spec/migrations/remove_security_dashboard_feature_flag_spec.rb
...migrations/remove_security_dashboard_feature_flag_spec.rb
+1
-1
spec/migrations/rename_security_dashboard_feature_flag_to_instance_security_dashboard_spec.rb
...board_feature_flag_to_instance_security_dashboard_spec.rb
+1
-1
spec/migrations/reschedule_builds_stages_migration_spec.rb
spec/migrations/reschedule_builds_stages_migration_spec.rb
+1
-1
spec/migrations/reschedule_commits_count_for_merge_request_diff_spec.rb
...s/reschedule_commits_count_for_merge_request_diff_spec.rb
+1
-1
spec/migrations/save_instance_administrators_group_id_spec.rb
.../migrations/save_instance_administrators_group_id_spec.rb
+1
-1
spec/migrations/schedule_digest_personal_access_tokens_spec.rb
...migrations/schedule_digest_personal_access_tokens_spec.rb
+1
-1
spec/migrations/schedule_fill_valid_time_for_pages_domain_certificates_spec.rb
...ule_fill_valid_time_for_pages_domain_certificates_spec.rb
+1
-1
spec/migrations/schedule_migrate_security_scans_spec.rb
spec/migrations/schedule_migrate_security_scans_spec.rb
+1
-1
spec/migrations/schedule_pages_metadata_migration_spec.rb
spec/migrations/schedule_pages_metadata_migration_spec.rb
+1
-1
spec/migrations/schedule_populate_merge_request_assignees_table_spec.rb
...s/schedule_populate_merge_request_assignees_table_spec.rb
+1
-1
spec/migrations/schedule_recalculate_project_authorizations_second_run_spec.rb
...ule_recalculate_project_authorizations_second_run_spec.rb
+1
-1
spec/migrations/schedule_recalculate_project_authorizations_spec.rb
...tions/schedule_recalculate_project_authorizations_spec.rb
+1
-1
spec/migrations/schedule_runners_token_encryption_spec.rb
spec/migrations/schedule_runners_token_encryption_spec.rb
+1
-1
spec/migrations/schedule_set_confidential_note_events_on_webhooks_spec.rb
...schedule_set_confidential_note_events_on_webhooks_spec.rb
+1
-1
spec/migrations/schedule_stages_index_migration_spec.rb
spec/migrations/schedule_stages_index_migration_spec.rb
+1
-1
spec/migrations/schedule_sync_issuables_state_id_spec.rb
spec/migrations/schedule_sync_issuables_state_id_spec.rb
+1
-1
spec/migrations/schedule_sync_issuables_state_id_where_nil_spec.rb
...ations/schedule_sync_issuables_state_id_where_nil_spec.rb
+1
-1
spec/migrations/schedule_to_archive_legacy_traces_spec.rb
spec/migrations/schedule_to_archive_legacy_traces_spec.rb
+1
-1
spec/migrations/schedule_update_existing_subgroup_to_match_visibility_level_of_parent_spec.rb
...ting_subgroup_to_match_visibility_level_of_parent_spec.rb
+1
-1
spec/migrations/services_remove_temporary_index_on_project_id_spec.rb
...ons/services_remove_temporary_index_on_project_id_spec.rb
+1
-1
spec/migrations/set_issue_id_for_all_versions_spec.rb
spec/migrations/set_issue_id_for_all_versions_spec.rb
+1
-1
spec/migrations/steal_fill_store_upload_spec.rb
spec/migrations/steal_fill_store_upload_spec.rb
+1
-1
spec/migrations/sync_issuables_state_id_spec.rb
spec/migrations/sync_issuables_state_id_spec.rb
+1
-1
spec/migrations/truncate_user_fullname_spec.rb
spec/migrations/truncate_user_fullname_spec.rb
+1
-1
spec/migrations/update_application_setting_npm_package_requests_forwarding_default_spec.rb
...n_setting_npm_package_requests_forwarding_default_spec.rb
+1
-1
spec/migrations/update_fingerprint_sha256_within_keys_spec.rb
.../migrations/update_fingerprint_sha256_within_keys_spec.rb
+1
-1
spec/migrations/update_minimum_password_length_spec.rb
spec/migrations/update_minimum_password_length_spec.rb
+1
-1
spec/migrations/update_project_import_visibility_level_spec.rb
...migrations/update_project_import_visibility_level_spec.rb
+1
-1
spec/migrations/update_timestamp_softwarelicensespolicy_spec.rb
...igrations/update_timestamp_softwarelicensespolicy_spec.rb
+1
-1
spec/spec_helper.rb
spec/spec_helper.rb
+9
-4
No files found.
doc/development/testing_guide/testing_migrations_guide.md
View file @
8e2624c5
...
...
@@ -18,7 +18,7 @@ a database schema.
Adding a
`:migration`
tag to a test signature enables some custom RSpec
`before`
and
`after`
hooks in our
[
`spec
_helper.rb`
](
https://gitlab.com/gitlab-org/gitlab/blob/3b29908a64ff729c0cf6d93452fe00ab23079c75/spec%2Fspec_helper.rb#L259
)
[
`spec
/support/migration.rb`
](
https://gitlab.com/gitlab-org/gitlab/-/blob/f81fa6ab1dd788b70ef44b85aaba1f31ffafae7d/spec/support/migration.rb
)
to run.
A
`before`
hook will revert all migrations to the point that a migration
...
...
@@ -112,7 +112,7 @@ migration. You can find the complete spec in
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20170526185842_migrate_pipeline_stages.rb'
)
describe
MigratePipelineStages
,
:migration
do
describe
MigratePipelineStages
do
# Create test data - pipeline and CI/CD jobs.
let
(
:jobs
)
{
table
(
:ci_builds
)
}
let
(
:stages
)
{
table
(
:ci_stages
)
}
...
...
@@ -163,7 +163,7 @@ schema tag to a context that you want to switch the database schema within.
Example:
```
ruby
describe
SomeClass
,
:migration
,
schema:
20170608152748
do
describe
SomeClass
,
schema:
20170608152748
do
# ...
end
```
...
...
@@ -178,7 +178,7 @@ background migration. You can find the complete spec on
```
ruby
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
ArchiveLegacyTraces
,
:migration
,
schema:
20180529152628
do
describe
Gitlab
::
BackgroundMigration
::
ArchiveLegacyTraces
,
schema:
20180529152628
do
include
TraceHelpers
let
(
:namespaces
)
{
table
(
:namespaces
)
}
...
...
ee/spec/lib/ee/gitlab/background_migration/backfill_version_data_from_gitaly_spec.rb
View file @
8e2624c5
...
...
@@ -3,8 +3,8 @@
require
'spec_helper'
# rubocop:disable RSpec/FactoriesInMigrationSpecs
describe
Gitlab
::
BackgroundMigration
::
BackfillVersionDataFromGitaly
do
let
_it_be
(
:issue
)
{
create
(
:issue
)
}
describe
Gitlab
::
BackgroundMigration
::
BackfillVersionDataFromGitaly
,
schema: :latest
do
let
(
:issue
)
{
create
(
:issue
)
}
def
perform_worker
described_class
.
new
.
perform
(
issue
.
id
)
...
...
ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_check_progress_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
MigrateApproverToApprovalRulesCheckProgress
do
describe
Gitlab
::
BackgroundMigration
::
MigrateApproverToApprovalRulesCheckProgress
,
schema: :latest
do
context
'when there is MigrateApproverToApprovalRulesInBatch jobs'
do
it
'reschedules check'
do
allow
(
Gitlab
::
BackgroundMigration
).
to
receive
(
:exists?
).
with
(
'MigrateApproverToApprovalRulesInBatch'
).
and_return
(
true
)
...
...
ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_in_batch_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
# rubocop:disable RSpec/FactoriesInMigrationSpecs
describe
Gitlab
::
BackgroundMigration
::
MigrateApproverToApprovalRulesInBatch
do
describe
Gitlab
::
BackgroundMigration
::
MigrateApproverToApprovalRulesInBatch
,
schema: :latest
do
context
'when there is no more MigrateApproverToApprovalRules jobs'
do
let
(
:job
)
{
double
(
:job
)
}
let
(
:project
)
{
create
(
:project
)
}
...
...
ee/spec/lib/ee/gitlab/background_migration/migrate_approver_to_approval_rules_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
# rubocop:disable RSpec/FactoriesInMigrationSpecs
describe
Gitlab
::
BackgroundMigration
::
MigrateApproverToApprovalRules
do
describe
Gitlab
::
BackgroundMigration
::
MigrateApproverToApprovalRules
,
schema: :latest
do
def
create_skip_sync
(
*
args
)
build
(
*
args
)
do
|
record
|
allow
(
record
).
to
receive
(
:schedule_approval_migration
)
...
...
ee/spec/lib/ee/gitlab/background_migration/migrate_security_scans_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
# rubocop: disable RSpec/FactoriesInMigrationSpecs
describe
Gitlab
::
BackgroundMigration
::
MigrateSecurityScans
,
:migration
,
schema:
20200220180944
do
describe
Gitlab
::
BackgroundMigration
::
MigrateSecurityScans
,
schema:
20200220180944
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:builds
)
{
table
(
:ci_builds
)
}
...
...
ee/spec/lib/ee/gitlab/background_migration/move_epic_issues_after_epics_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
MoveEpicIssuesAfterEpics
,
:migration
,
schema:
20190926180443
do
describe
Gitlab
::
BackgroundMigration
::
MoveEpicIssuesAfterEpics
,
schema:
20190926180443
do
let
(
:users
)
{
table
(
:users
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
ee/spec/lib/ee/gitlab/background_migration/populate_any_approval_rule_for_merge_requests_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
PopulateAnyApprovalRuleForMergeRequests
,
:migration
,
schema:
2019_09_05_091831
do
describe
Gitlab
::
BackgroundMigration
::
PopulateAnyApprovalRuleForMergeRequests
,
schema:
2019_09_05_091831
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:namespace
)
{
namespaces
.
create
(
name:
'gitlab'
,
path:
'gitlab-org'
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
ee/spec/lib/ee/gitlab/background_migration/populate_any_approval_rule_for_projects_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
PopulateAnyApprovalRuleForProjects
,
:migration
,
schema:
2019_09_05_091812
do
describe
Gitlab
::
BackgroundMigration
::
PopulateAnyApprovalRuleForProjects
,
schema:
2019_09_05_091812
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:namespace
)
{
namespaces
.
create
(
name:
'gitlab'
,
path:
'gitlab-org'
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
ee/spec/lib/ee/gitlab/background_migration/prune_orphaned_geo_events_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
PruneOrphanedGeoEvents
,
:migration
,
:postgresql
,
geo:
false
,
schema:
2020_01_02_170221
do
describe
Gitlab
::
BackgroundMigration
::
PruneOrphanedGeoEvents
,
geo:
false
,
schema:
2020_01_02_170221
do
let
(
:event_table_name
)
{
'geo_repository_updated_events'
}
let
(
:geo_event_log
)
{
table
(
:geo_event_log
)
}
let
(
:geo_updated_events
)
{
table
(
event_table_name
)
}
...
...
ee/spec/lib/ee/gitlab/background_migration/remove_undefined_occurrence_severity_level_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
RemoveUndefinedOccurrenceSeverityLevel
,
:migration
,
schema:
20200227140242
do
describe
Gitlab
::
BackgroundMigration
::
RemoveUndefinedOccurrenceSeverityLevel
,
schema:
20200227140242
do
let
(
:vulnerabilities
)
{
table
(
:vulnerability_occurrences
)
}
let
(
:identifiers
)
{
table
(
:vulnerability_identifiers
)
}
let
(
:scanners
)
{
table
(
:vulnerability_scanners
)
}
...
...
ee/spec/lib/ee/gitlab/background_migration/update_authorized_keys_file_since_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
# rubocop:disable RSpec/FactoriesInMigrationSpecs
describe
Gitlab
::
BackgroundMigration
::
UpdateAuthorizedKeysFileSince
do
describe
Gitlab
::
BackgroundMigration
::
UpdateAuthorizedKeysFileSince
,
schema: :latest
do
let
(
:background_migration
)
{
described_class
.
new
}
describe
'#perform'
do
...
...
ee/spec/lib/ee/gitlab/background_migration/update_vulnerability_confidence_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
UpdateVulnerabilityConfidence
,
:migration
,
schema:
20190909141517
do
describe
Gitlab
::
BackgroundMigration
::
UpdateVulnerabilityConfidence
,
schema:
20190909141517
do
let
(
:vulnerabilities
)
{
table
(
:vulnerability_occurrences
)
}
let
(
:identifiers
)
{
table
(
:vulnerability_identifiers
)
}
let
(
:scanners
)
{
table
(
:vulnerability_scanners
)
}
...
...
ee/spec/lib/gitlab/background_migration/fix_orphan_promoted_issues_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
FixOrphanPromotedIssues
,
:migration
,
schema:
20200207185149
do
describe
Gitlab
::
BackgroundMigration
::
FixOrphanPromotedIssues
,
schema:
20200207185149
do
let
(
:users
)
{
table
(
:users
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
ee/spec/lib/gitlab/background_migration/user_mentions/create_resource_user_mention_spec.rb
View file @
8e2624c5
...
...
@@ -7,7 +7,7 @@ require './db/post_migrate/20200214174519_remigrate_epic_mentions_to_db'
require
'./db/post_migrate/20200214174607_remigrate_epic_notes_mentions_to_db'
require
'./db/post_migrate/20200124110831_migrate_design_notes_mentions_to_db'
describe
Gitlab
::
BackgroundMigration
::
UserMentions
::
CreateResourceUserMention
do
describe
Gitlab
::
BackgroundMigration
::
UserMentions
::
CreateResourceUserMention
,
schema: :latest
do
include
MigrationsHelpers
context
'when migrating data'
do
...
...
ee/spec/lib/gitlab/geo/log_cursor/events/container_repository_updated_event_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
Geo
::
LogCursor
::
Events
::
ContainerRepositoryUpdatedEvent
,
:
postgresql
,
:
clean_gitlab_redis_shared_state
do
describe
Gitlab
::
Geo
::
LogCursor
::
Events
::
ContainerRepositoryUpdatedEvent
,
:clean_gitlab_redis_shared_state
do
let
(
:logger
)
{
Gitlab
::
Geo
::
LogCursor
::
Logger
.
new
(
described_class
,
Logger
::
INFO
)
}
let
(
:event_log
)
{
create
(
:geo_event_log
,
:container_repository_updated_event
)
}
let!
(
:event_log_state
)
{
create
(
:geo_event_log_state
,
event_id:
event_log
.
id
-
1
)
}
...
...
ee/spec/migrations/add_unique_constraint_to_software_licenses_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191108202723_add_unique_constraint_to_software_licenses.rb'
)
describe
AddUniqueConstraintToSoftwareLicenses
,
:migration
do
describe
AddUniqueConstraintToSoftwareLicenses
do
let
(
:migration
)
{
described_class
.
new
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:licenses
)
{
table
(
:software_licenses
)
}
...
...
ee/spec/migrations/backfill_operations_feature_flags_iid_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200117194850_backfill_operations_feature_flags_iid.rb'
)
describe
BackfillOperationsFeatureFlagsIid
,
:migration
do
describe
BackfillOperationsFeatureFlagsIid
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:flags
)
{
table
(
:operations_feature_flags
)
}
...
...
ee/spec/migrations/backfill_software_licenses_spdx_identifiers_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190917173107_backfill_software_licenses_spdx_identifiers.rb'
)
describe
BackfillSoftwareLicensesSpdxIdentifiers
,
:migration
do
describe
BackfillSoftwareLicensesSpdxIdentifiers
do
let
(
:software_licenses
)
{
table
(
:software_licenses
)
}
describe
'#up'
do
...
...
ee/spec/migrations/backfill_version_author_and_created_at_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191030223057_backfill_version_author_and_created_at.rb'
)
describe
BackfillVersionAuthorAndCreatedAt
,
:migration
do
describe
BackfillVersionAuthorAndCreatedAt
do
let_it_be
(
:migration_name
)
{
described_class
::
MIGRATION
.
to_s
.
demodulize
}
let_it_be
(
:projects
)
{
table
(
:projects
)
}
let_it_be
(
:issues
)
{
table
(
:issues
)
}
...
...
ee/spec/migrations/cleanup_deploy_access_levels_for_removed_groups_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191125024005_cleanup_deploy_access_levels_for_removed_groups.rb'
)
describe
CleanupDeployAccessLevelsForRemovedGroups
,
:migration
do
describe
CleanupDeployAccessLevelsForRemovedGroups
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:groups
)
{
table
(
:namespaces
)
}
...
...
ee/spec/migrations/cleanup_empty_epic_user_mentions_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200214173000_cleanup_empty_epic_user_mentions'
)
describe
CleanupEmptyEpicUserMentions
,
:
migration
,
:
sidekiq
do
describe
CleanupEmptyEpicUserMentions
,
:sidekiq
do
let
(
:users
)
{
table
(
:users
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:epics
)
{
table
(
:epics
)
}
...
...
ee/spec/migrations/fix_any_approver_rule_for_projects_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191008143850_fix_any_approver_rule_for_projects.rb'
)
describe
FixAnyApproverRuleForProjects
,
:migration
do
describe
FixAnyApproverRuleForProjects
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:namespace
)
{
namespaces
.
create
(
name:
'gitlab'
,
path:
'gitlab-org'
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
ee/spec/migrations/geo/migrate_ci_job_artifacts_to_separate_registry_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'geo'
,
'migrate'
,
'20180322062741_migrate_ci_job_artifacts_to_separate_registry.rb'
)
describe
MigrateCiJobArtifactsToSeparateRegistry
,
:geo
,
:migration
do
describe
MigrateCiJobArtifactsToSeparateRegistry
,
:geo
do
let
(
:file_registry
)
{
table
(
:file_registry
)
}
let
(
:job_artifact_registry
)
{
table
(
:job_artifact_registry
)
}
...
...
ee/spec/migrations/geo/migrate_lfs_objects_to_separate_registry_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'geo'
,
'migrate'
,
'20191010204941_migrate_lfs_objects_to_separate_registry.rb'
)
describe
MigrateLfsObjectsToSeparateRegistry
,
:geo
,
:migration
do
describe
MigrateLfsObjectsToSeparateRegistry
,
:geo
do
let
(
:file_registry
)
{
table
(
:file_registry
)
}
let
(
:lfs_object_registry
)
{
table
(
:lfs_object_registry
)
}
...
...
ee/spec/migrations/geo/set_resync_flag_for_retried_projects_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'ee'
,
'db'
,
'geo'
,
'migrate'
,
'20180510223634_set_resync_flag_for_retried_projects.rb'
)
describe
SetResyncFlagForRetriedProjects
,
:geo
,
:migration
do
describe
SetResyncFlagForRetriedProjects
,
:geo
do
let
(
:registry
)
{
table
(
:project_registry
)
}
before
do
...
...
ee/spec/migrations/migrate_design_notes_mentions_to_db_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200124110831_migrate_design_notes_mentions_to_db'
)
describe
MigrateDesignNotesMentionsToDb
,
:
migration
,
:
sidekiq
do
describe
MigrateDesignNotesMentionsToDb
,
:sidekiq
do
let
(
:users
)
{
table
(
:users
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
...
...
ee/spec/migrations/migrate_epic_mentions_to_db_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191115115043_migrate_epic_mentions_to_db'
)
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200214174519_remigrate_epic_mentions_to_db'
)
describe
'epic mentions migration'
do
describe
'epic mentions migration'
,
migration:
false
do
let
(
:users
)
{
table
(
:users
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:epics
)
{
table
(
:epics
)
}
...
...
ee/spec/migrations/migrate_epic_notes_mentions_to_db_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191115115522_migrate_epic_notes_mentions_to_db'
)
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200214174607_remigrate_epic_notes_mentions_to_db'
)
describe
'epic notes mentions migration'
do
describe
'epic notes mentions migration'
,
migration:
false
do
let
(
:users
)
{
table
(
:users
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:epics
)
{
table
(
:epics
)
}
...
...
ee/spec/migrations/nullify_feature_flag_plaintext_tokens_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191022113635_nullify_feature_flag_plaintext_tokens.rb'
)
describe
NullifyFeatureFlagPlaintextTokens
,
:migration
do
describe
NullifyFeatureFlagPlaintextTokens
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:feature_flags_clients
)
{
table
(
:operations_feature_flags_clients
)
}
...
...
ee/spec/migrations/remove_creations_in_gitlab_subscription_histories_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200113151354_remove_creations_in_gitlab_subscription_histories.rb'
)
describe
RemoveCreationsInGitlabSubscriptionHistories
,
:migration
do
describe
RemoveCreationsInGitlabSubscriptionHistories
do
GITLAB_SUBSCRIPTION_CREATED
=
0
GITLAB_SUBSCRIPTION_UPDATED
=
1
GITLAB_SUBSCRIPTION_DESTROYED
=
2
...
...
ee/spec/migrations/schedule_fix_orphan_promoted_issues_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200207185149_schedule_fix_orphan_promoted_issues.rb'
)
describe
ScheduleFixOrphanPromotedIssues
,
:migration
do
describe
ScheduleFixOrphanPromotedIssues
do
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:notes
)
{
table
(
:notes
)
}
let
(
:project1
)
{
projects
.
create!
(
namespace_id:
99
)
}
...
...
ee/spec/migrations/schedule_merge_request_any_approval_rule_migration_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190905091831_schedule_merge_request_any_approval_rule_migration.rb'
)
describe
ScheduleMergeRequestAnyApprovalRuleMigration
,
:migration
do
describe
ScheduleMergeRequestAnyApprovalRuleMigration
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:namespace
)
{
namespaces
.
create
(
name:
'gitlab'
,
path:
'gitlab-org'
)
}
...
...
ee/spec/migrations/schedule_project_any_approval_rule_migration_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190905091812_schedule_project_any_approval_rule_migration.rb'
)
describe
ScheduleProjectAnyApprovalRuleMigration
,
:migration
do
describe
ScheduleProjectAnyApprovalRuleMigration
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:namespace
)
{
namespaces
.
create
(
name:
'gitlab'
,
path:
'gitlab-org'
)
}
...
...
ee/spec/migrations/set_report_type_for_vulnerabilities_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191105094625_set_report_type_for_vulnerabilities.rb'
)
describe
SetReportTypeForVulnerabilities
,
:migration
do
describe
SetReportTypeForVulnerabilities
do
let
(
:confidence_levels
)
do
{
undefined:
0
,
ignore:
1
,
unknown:
2
,
experimental:
3
,
low:
4
,
medium:
5
,
high:
6
,
confirmed:
7
}
end
...
...
ee/spec/migrations/set_resolved_state_on_vulnerabilities_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191114173624_set_resolved_state_on_vulnerabilities.rb'
)
describe
SetResolvedStateOnVulnerabilities
,
:migration
do
describe
SetResolvedStateOnVulnerabilities
do
PACK_FORMAT
=
'H*'
let
(
:confidence_levels
)
do
...
...
ee/spec/migrations/update_cs_vulnerability_confidence_column_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190909141517_update_cs_vulnerability_confidence_column.rb'
)
describe
UpdateCsVulnerabilityConfidenceColumn
,
:migration
do
describe
UpdateCsVulnerabilityConfidenceColumn
do
let
(
:vulnerabilities
)
{
table
(
:vulnerability_occurrences
)
}
let
(
:identifiers
)
{
table
(
:vulnerability_identifiers
)
}
let
(
:scanners
)
{
table
(
:vulnerability_scanners
)
}
...
...
ee/spec/migrations/update_occurrence_severity_column_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200227140242_update_occurrence_severity_column.rb'
)
describe
UpdateOccurrenceSeverityColumn
,
:migration
do
describe
UpdateOccurrenceSeverityColumn
do
let
(
:vulnerabilities
)
{
table
(
:vulnerability_occurrences
)
}
let
(
:identifiers
)
{
table
(
:vulnerability_identifiers
)
}
let
(
:scanners
)
{
table
(
:vulnerability_scanners
)
}
...
...
spec/lib/gitlab/background_migration/add_merge_request_diff_commits_count_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
AddMergeRequestDiffCommitsCount
,
:migration
,
schema:
20180105212544
do
describe
Gitlab
::
BackgroundMigration
::
AddMergeRequestDiffCommitsCount
,
schema:
20180105212544
do
let
(
:projects_table
)
{
table
(
:projects
)
}
let
(
:merge_requests_table
)
{
table
(
:merge_requests
)
}
let
(
:merge_request_diffs_table
)
{
table
(
:merge_request_diffs
)
}
...
...
spec/lib/gitlab/background_migration/archive_legacy_traces_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
ArchiveLegacyTraces
,
:migration
,
schema:
20180529152628
do
describe
Gitlab
::
BackgroundMigration
::
ArchiveLegacyTraces
,
schema:
20180529152628
do
include
TraceHelpers
let
(
:namespaces
)
{
table
(
:namespaces
)
}
...
...
spec/lib/gitlab/background_migration/backfill_hashed_project_repositories_spec.rb
View file @
8e2624c5
...
...
@@ -2,6 +2,6 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
BackfillHashedProjectRepositories
,
:migration
,
schema:
20181130102132
do
describe
Gitlab
::
BackgroundMigration
::
BackfillHashedProjectRepositories
,
schema:
20181130102132
do
it_behaves_like
'backfill migration for project repositories'
,
:hashed
end
spec/lib/gitlab/background_migration/backfill_legacy_project_repositories_spec.rb
View file @
8e2624c5
...
...
@@ -2,6 +2,6 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
BackfillLegacyProjectRepositories
,
:migration
,
schema:
20181212171634
do
describe
Gitlab
::
BackgroundMigration
::
BackfillLegacyProjectRepositories
,
schema:
20181212171634
do
it_behaves_like
'backfill migration for project repositories'
,
:legacy
end
spec/lib/gitlab/background_migration/backfill_project_fullpath_in_repo_config_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
BackfillProjectFullpathInRepoConfig
,
:migration
,
schema:
20181010133639
do
describe
Gitlab
::
BackgroundMigration
::
BackfillProjectFullpathInRepoConfig
,
schema:
20181010133639
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:group
)
{
namespaces
.
create!
(
name:
'foo'
,
path:
'foo'
)
}
...
...
spec/lib/gitlab/background_migration/backfill_project_repositories_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
# rubocop:disable RSpec/FactoriesInMigrationSpecs
describe
Gitlab
::
BackgroundMigration
::
BackfillProjectRepositories
do
describe
Gitlab
::
BackgroundMigration
::
BackfillProjectRepositories
,
schema: :latest
do
let
(
:group
)
{
create
(
:group
,
name:
'foo'
,
path:
'foo'
)
}
describe
described_class
::
ShardFinder
do
...
...
spec/lib/gitlab/background_migration/backfill_project_settings_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
BackfillProjectSettings
,
:migration
,
schema:
20200114113341
do
describe
Gitlab
::
BackgroundMigration
::
BackfillProjectSettings
,
schema:
20200114113341
do
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:project_settings
)
{
table
(
:project_settings
)
}
let
(
:namespace
)
{
table
(
:namespaces
).
create
(
name:
'user'
,
path:
'user'
)
}
...
...
spec/lib/gitlab/background_migration/digest_column_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
DigestColumn
,
:migration
,
schema:
20180913142237
do
describe
Gitlab
::
BackgroundMigration
::
DigestColumn
,
schema:
20180913142237
do
let
(
:personal_access_tokens
)
{
table
(
:personal_access_tokens
)
}
let
(
:users
)
{
table
(
:users
)
}
...
...
spec/lib/gitlab/background_migration/encrypt_columns_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
EncryptColumns
,
:migration
,
schema:
20180910115836
do
describe
Gitlab
::
BackgroundMigration
::
EncryptColumns
,
schema:
20180910115836
do
let
(
:model
)
{
Gitlab
::
BackgroundMigration
::
Models
::
EncryptColumns
::
WebHook
}
let
(
:web_hooks
)
{
table
(
:web_hooks
)
}
...
...
spec/lib/gitlab/background_migration/encrypt_runners_tokens_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
EncryptRunnersTokens
,
:migration
,
schema:
20181121111200
do
describe
Gitlab
::
BackgroundMigration
::
EncryptRunnersTokens
,
schema:
20181121111200
do
let
(
:settings
)
{
table
(
:application_settings
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/lib/gitlab/background_migration/fix_cross_project_label_links_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
FixCrossProjectLabelLinks
,
:migration
,
schema:
20180702120647
do
describe
Gitlab
::
BackgroundMigration
::
FixCrossProjectLabelLinks
,
schema:
20180702120647
do
let
(
:namespaces_table
)
{
table
(
:namespaces
)
}
let
(
:projects_table
)
{
table
(
:projects
)
}
let
(
:issues_table
)
{
table
(
:issues
)
}
...
...
spec/lib/gitlab/background_migration/fix_projects_without_project_feature_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
FixProjectsWithoutProjectFeature
,
:migration
,
schema:
2020_01_27_111840
do
describe
Gitlab
::
BackgroundMigration
::
FixProjectsWithoutProjectFeature
,
schema:
2020_01_27_111840
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:project_features
)
{
table
(
:project_features
)
}
...
...
spec/lib/gitlab/background_migration/fix_promoted_epics_discussion_ids_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
FixPromotedEpicsDiscussionIds
,
:migration
,
schema:
20190715193142
do
describe
Gitlab
::
BackgroundMigration
::
FixPromotedEpicsDiscussionIds
,
schema:
20190715193142
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:users
)
{
table
(
:users
)
}
let
(
:epics
)
{
table
(
:epics
)
}
...
...
spec/lib/gitlab/background_migration/fix_user_namespace_names_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
FixUserNamespaceNames
,
:migration
,
schema:
20190620112608
do
describe
Gitlab
::
BackgroundMigration
::
FixUserNamespaceNames
,
schema:
20190620112608
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:users
)
{
table
(
:users
)
}
let
(
:user
)
{
users
.
create
(
name:
"The user's full name"
,
projects_limit:
10
,
username:
'not-null'
,
email:
'1'
)
}
...
...
spec/lib/gitlab/background_migration/fix_user_project_route_names_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
FixUserProjectRouteNames
,
:migration
,
schema:
20190620112608
do
describe
Gitlab
::
BackgroundMigration
::
FixUserProjectRouteNames
,
schema:
20190620112608
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:users
)
{
table
(
:users
)
}
let
(
:routes
)
{
table
(
:routes
)
}
...
...
spec/lib/gitlab/background_migration/legacy_upload_mover_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
# rubocop: disable RSpec/FactoriesInMigrationSpecs
describe
Gitlab
::
BackgroundMigration
::
LegacyUploadMover
do
describe
Gitlab
::
BackgroundMigration
::
LegacyUploadMover
,
schema: :latest
do
let
(
:test_dir
)
{
FileUploader
.
options
[
'storage_path'
]
}
let
(
:filename
)
{
'image.png'
}
...
...
spec/lib/gitlab/background_migration/legacy_uploads_migrator_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
# rubocop: disable RSpec/FactoriesInMigrationSpecs
describe
Gitlab
::
BackgroundMigration
::
LegacyUploadsMigrator
do
describe
Gitlab
::
BackgroundMigration
::
LegacyUploadsMigrator
,
schema: :latest
do
let
(
:test_dir
)
{
FileUploader
.
options
[
'storage_path'
]
}
let!
(
:hashed_project
)
{
create
(
:project
)
}
...
...
spec/lib/gitlab/background_migration/merge_request_assignees_migration_progress_check_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
MergeRequestAssigneesMigrationProgressCheck
do
describe
Gitlab
::
BackgroundMigration
::
MergeRequestAssigneesMigrationProgressCheck
,
schema: :latest
do
context
'rescheduling'
do
context
'when there are ongoing and no dead jobs'
do
it
'reschedules check'
do
...
...
spec/lib/gitlab/background_migration/migrate_build_stage_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
MigrateBuildStage
,
:migration
,
schema:
20180212101928
do
describe
Gitlab
::
BackgroundMigration
::
MigrateBuildStage
,
schema:
20180212101928
do
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:pipelines
)
{
table
(
:ci_pipelines
)
}
let
(
:stages
)
{
table
(
:ci_stages
)
}
...
...
spec/lib/gitlab/background_migration/migrate_fingerprint_sha256_within_keys_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
MigrateFingerprintSha256WithinKeys
,
:migration
,
schema:
20200106071113
do
describe
Gitlab
::
BackgroundMigration
::
MigrateFingerprintSha256WithinKeys
,
schema:
20200106071113
do
subject
(
:fingerprint_migrator
)
{
described_class
.
new
}
let
(
:key_table
)
{
table
(
:keys
)
}
...
...
spec/lib/gitlab/background_migration/migrate_issue_trackers_sensitive_data_spec.rb
View file @
8e2624c5
# frozen_string_literal: true
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
MigrateIssueTrackersSensitiveData
,
:migration
,
schema:
20200130145430
do
describe
Gitlab
::
BackgroundMigration
::
MigrateIssueTrackersSensitiveData
,
schema:
20200130145430
do
let
(
:services
)
{
table
(
:services
)
}
# we need to define the classes due to encryption
...
...
spec/lib/gitlab/background_migration/migrate_legacy_artifacts_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
MigrateLegacyArtifacts
,
:migration
,
schema:
20180816161409
do
describe
Gitlab
::
BackgroundMigration
::
MigrateLegacyArtifacts
,
schema:
20180816161409
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:pipelines
)
{
table
(
:ci_pipelines
)
}
...
...
spec/lib/gitlab/background_migration/migrate_null_private_profile_to_false_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
MigrateNullPrivateProfileToFalse
,
:migration
,
schema:
20190620105427
do
describe
Gitlab
::
BackgroundMigration
::
MigrateNullPrivateProfileToFalse
,
schema:
20190620105427
do
let
(
:users
)
{
table
(
:users
)
}
it
'correctly migrates nil private_profile to false'
do
...
...
spec/lib/gitlab/background_migration/migrate_pages_metadata_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
MigratePagesMetadata
,
:migration
,
schema:
20190919040324
do
describe
Gitlab
::
BackgroundMigration
::
MigratePagesMetadata
,
schema:
20190919040324
do
let
(
:projects
)
{
table
(
:projects
)
}
subject
(
:migrate_pages_metadata
)
{
described_class
.
new
}
...
...
spec/lib/gitlab/background_migration/migrate_stage_index_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
MigrateStageIndex
,
:migration
,
schema:
20180420080616
do
describe
Gitlab
::
BackgroundMigration
::
MigrateStageIndex
,
schema:
20180420080616
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:pipelines
)
{
table
(
:ci_pipelines
)
}
...
...
spec/lib/gitlab/background_migration/populate_cluster_kubernetes_namespace_table_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
PopulateClusterKubernetesNamespaceTable
,
:migration
,
schema:
20181022173835
do
describe
Gitlab
::
BackgroundMigration
::
PopulateClusterKubernetesNamespaceTable
,
schema:
20181022173835
do
include
MigrationHelpers
::
ClusterHelpers
let
(
:migration
)
{
described_class
.
new
}
...
...
spec/lib/gitlab/background_migration/populate_merge_request_assignees_table_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
PopulateMergeRequestAssigneesTable
,
:migration
,
schema:
20190315191339
do
describe
Gitlab
::
BackgroundMigration
::
PopulateMergeRequestAssigneesTable
,
schema:
20190315191339
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:users
)
{
table
(
:users
)
}
...
...
spec/lib/gitlab/background_migration/populate_untracked_uploads_dependencies/untracked_file_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
# Rollback DB to 10.5 (later than this was originally written for) because it still needs to work.
describe
Gitlab
::
BackgroundMigration
::
PopulateUntrackedUploadsDependencies
::
UntrackedFile
,
:migration
,
schema:
20180208183958
do
describe
Gitlab
::
BackgroundMigration
::
PopulateUntrackedUploadsDependencies
::
UntrackedFile
,
schema:
20180208183958
do
include
MigrationsHelpers
::
TrackUntrackedUploadsHelpers
let!
(
:appearances
)
{
table
(
:appearances
)
}
...
...
spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
# Rollback DB to 10.5 (later than this was originally written for) because it still needs to work.
describe
Gitlab
::
BackgroundMigration
::
PopulateUntrackedUploads
,
:migration
,
schema:
20180208183958
do
describe
Gitlab
::
BackgroundMigration
::
PopulateUntrackedUploads
,
schema:
20180208183958
do
include
MigrationsHelpers
::
TrackUntrackedUploadsHelpers
subject
{
described_class
.
new
}
...
...
spec/lib/gitlab/background_migration/prepare_untracked_uploads_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
# Rollback DB to 10.5 (later than this was originally written for) because it still needs to work.
describe
Gitlab
::
BackgroundMigration
::
PrepareUntrackedUploads
,
:migration
,
schema:
20180208183958
do
describe
Gitlab
::
BackgroundMigration
::
PrepareUntrackedUploads
,
schema:
20180208183958
do
include
MigrationsHelpers
::
TrackUntrackedUploadsHelpers
let!
(
:untracked_files_for_uploads
)
{
table
(
:untracked_files_for_uploads
)
}
...
...
spec/lib/gitlab/background_migration/recalculate_project_authorizations_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
RecalculateProjectAuthorizations
,
:migration
,
schema:
20200204113223
do
describe
Gitlab
::
BackgroundMigration
::
RecalculateProjectAuthorizations
,
schema:
20200204113223
do
let
(
:users_table
)
{
table
(
:users
)
}
let
(
:namespaces_table
)
{
table
(
:namespaces
)
}
let
(
:projects_table
)
{
table
(
:projects
)
}
...
...
spec/lib/gitlab/background_migration/recalculate_project_authorizations_with_min_max_user_id_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
RecalculateProjectAuthorizationsWithMinMaxUserId
,
:migration
,
schema:
20200204113224
do
describe
Gitlab
::
BackgroundMigration
::
RecalculateProjectAuthorizationsWithMinMaxUserId
,
schema:
20200204113224
do
let
(
:users_table
)
{
table
(
:users
)
}
let
(
:min
)
{
1
}
let
(
:max
)
{
5
}
...
...
spec/lib/gitlab/background_migration/remove_restricted_todos_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
RemoveRestrictedTodos
,
:migration
,
schema:
20180704204006
do
describe
Gitlab
::
BackgroundMigration
::
RemoveRestrictedTodos
,
schema:
20180704204006
do
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:users
)
{
table
(
:users
)
}
let
(
:todos
)
{
table
(
:todos
)
}
...
...
spec/lib/gitlab/background_migration/reset_merge_status_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
ResetMergeStatus
,
:migration
,
schema:
20190528180441
do
describe
Gitlab
::
BackgroundMigration
::
ResetMergeStatus
,
schema:
20190528180441
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:namespace
)
{
namespaces
.
create
(
name:
'gitlab'
,
path:
'gitlab-org'
)
}
...
...
spec/lib/gitlab/background_migration/schedule_calculate_wiki_sizes_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190527194900_schedule_calculate_wiki_sizes.rb'
)
describe
ScheduleCalculateWikiSizes
,
:migration
do
describe
ScheduleCalculateWikiSizes
do
let
(
:migration_class
)
{
Gitlab
::
BackgroundMigration
::
CalculateWikiSizes
}
let
(
:migration_name
)
{
migration_class
.
to_s
.
demodulize
}
...
...
spec/lib/gitlab/background_migration/set_confidential_note_events_on_services_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
SetConfidentialNoteEventsOnServices
,
:migration
,
schema:
20180122154930
do
describe
Gitlab
::
BackgroundMigration
::
SetConfidentialNoteEventsOnServices
,
schema:
20180122154930
do
let
(
:services
)
{
table
(
:services
)
}
describe
'#perform'
do
...
...
spec/lib/gitlab/background_migration/set_confidential_note_events_on_webhooks_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
SetConfidentialNoteEventsOnWebhooks
,
:migration
,
schema:
20180104131052
do
describe
Gitlab
::
BackgroundMigration
::
SetConfidentialNoteEventsOnWebhooks
,
schema:
20180104131052
do
let
(
:web_hooks
)
{
table
(
:web_hooks
)
}
describe
'#perform'
do
...
...
spec/lib/gitlab/background_migration/update_existing_subgroup_to_match_visibility_level_of_parent_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
::
UpdateExistingSubgroupToMatchVisibilityLevelOfParent
,
:migration
,
schema:
2020_01_10_121314
do
describe
Gitlab
::
BackgroundMigration
::
UpdateExistingSubgroupToMatchVisibilityLevelOfParent
,
schema:
2020_01_10_121314
do
include
MigrationHelpers
::
NamespacesHelpers
context
'private visibility level'
do
...
...
spec/lib/gitlab/background_migration_spec.rb
View file @
8e2624c5
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
Gitlab
::
BackgroundMigration
do
describe
Gitlab
::
BackgroundMigration
,
schema: :latest
do
describe
'.queue'
do
it
'returns background migration worker queue'
do
expect
(
described_class
.
queue
)
...
...
spec/migrations/20190924152703_migrate_issue_trackers_data_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190924152703_migrate_issue_trackers_data.rb'
)
describe
MigrateIssueTrackersData
,
:migration
do
describe
MigrateIssueTrackersData
do
let
(
:services
)
{
table
(
:services
)
}
let
(
:migration_class
)
{
Gitlab
::
BackgroundMigration
::
MigrateIssueTrackersSensitiveData
}
let
(
:migration_name
)
{
migration_class
.
to_s
.
demodulize
}
...
...
spec/migrations/20191015154408_drop_merge_requests_require_code_owner_approval_from_projects_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191015154408_drop_merge_requests_require_code_owner_approval_from_projects.rb'
)
describe
DropMergeRequestsRequireCodeOwnerApprovalFromProjects
,
:migration
do
describe
DropMergeRequestsRequireCodeOwnerApprovalFromProjects
do
let
(
:projects_table
)
{
table
(
:projects
)
}
subject
(
:migration
)
{
described_class
.
new
}
...
...
spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20191125114345_add_admin_mode_protected_path.rb'
)
describe
AddAdminModeProtectedPath
,
:migration
do
describe
AddAdminModeProtectedPath
do
ADMIN_MODE_ENDPOINT
=
'/admin/session'
subject
(
:migration
)
{
described_class
.
new
}
...
...
spec/migrations/20191204114127_delete_legacy_triggers_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191204114127_delete_legacy_triggers.rb'
)
describe
DeleteLegacyTriggers
,
:migration
,
schema:
2019_11_25_140458
do
describe
DeleteLegacyTriggers
,
schema:
2019_11_25_140458
do
let
(
:ci_trigger_table
)
{
table
(
:ci_triggers
)
}
let
(
:user
)
{
table
(
:users
).
create!
(
name:
'test'
,
email:
'test@example.com'
,
projects_limit:
1
)
}
...
...
spec/migrations/20200107172020_add_timestamp_softwarelicensespolicy_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20200107172020_add_timestamp_softwarelicensespolicy.rb'
)
describe
AddTimestampSoftwarelicensespolicy
,
:migration
do
describe
AddTimestampSoftwarelicensespolicy
do
let
(
:software_licenses_policy
)
{
table
(
:software_license_policies
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:licenses
)
{
table
(
:software_licenses
)
}
...
...
spec/migrations/20200122123016_backfill_project_settings_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200122123016_backfill_project_settings.rb'
)
describe
BackfillProjectSettings
,
:
migration
,
:
sidekiq
,
schema:
20200114113341
do
describe
BackfillProjectSettings
,
:sidekiq
,
schema:
20200114113341
do
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:namespace
)
{
table
(
:namespaces
).
create
(
name:
'user'
,
path:
'user'
)
}
let
(
:project
)
{
projects
.
create
(
namespace_id:
namespace
.
id
)
}
...
...
spec/migrations/20200123155929_remove_invalid_jira_data_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200123155929_remove_invalid_jira_data.rb'
)
describe
RemoveInvalidJiraData
,
:migration
do
describe
RemoveInvalidJiraData
do
let
(
:jira_tracker_data
)
{
table
(
:jira_tracker_data
)
}
let
(
:services
)
{
table
(
:services
)
}
...
...
spec/migrations/20200127090233_remove_invalid_issue_tracker_data_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200127090233_remove_invalid_issue_tracker_data.rb'
)
describe
RemoveInvalidIssueTrackerData
,
:migration
do
describe
RemoveInvalidIssueTrackerData
do
let
(
:issue_tracker_data
)
{
table
(
:issue_tracker_data
)
}
let
(
:services
)
{
table
(
:services
)
}
...
...
spec/migrations/20200130145430_reschedule_migrate_issue_trackers_data_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200130145430_reschedule_migrate_issue_trackers_data.rb'
)
describe
RescheduleMigrateIssueTrackersData
,
:migration
do
describe
RescheduleMigrateIssueTrackersData
do
let
(
:services
)
{
table
(
:services
)
}
let
(
:migration_class
)
{
Gitlab
::
BackgroundMigration
::
MigrateIssueTrackersSensitiveData
}
let
(
:migration_name
)
{
migration_class
.
to_s
.
demodulize
}
...
...
spec/migrations/active_record/schedule_set_confidential_note_events_on_services_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180122154930_schedule_set_confidential_note_events_on_services.rb'
)
describe
ScheduleSetConfidentialNoteEventsOnServices
,
:migration
do
describe
ScheduleSetConfidentialNoteEventsOnServices
do
let
(
:services_table
)
{
table
(
:services
)
}
let
(
:migration_class
)
{
Gitlab
::
BackgroundMigration
::
SetConfidentialNoteEventsOnServices
}
let
(
:migration_name
)
{
migration_class
.
to_s
.
demodulize
}
...
...
spec/migrations/active_record/schema_spec.rb
View file @
8e2624c5
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
# Check consistency of db/schema.rb version, migrations' timestamps, and the latest migration timestamp
# stored in the database's schema_migrations table.
describe
ActiveRecord
::
Schema
do
describe
ActiveRecord
::
Schema
,
schema: :latest
do
let
(
:latest_migration_timestamp
)
do
migrations_paths
=
%w[db/migrate db/post_migrate]
.
map
{
|
path
|
Rails
.
root
.
join
(
*
path
,
'*'
)
}
...
...
spec/migrations/add_default_and_free_plans_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20191023152913_add_default_and_free_plans.rb'
)
describe
AddDefaultAndFreePlans
,
:migration
do
describe
AddDefaultAndFreePlans
do
describe
'migrate'
do
let
(
:plans
)
{
table
(
:plans
)
}
...
...
spec/migrations/add_deploy_token_type_to_deploy_tokens_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20200122161638_add_deploy_token_type_to_deploy_tokens.rb'
)
describe
AddDeployTokenTypeToDeployTokens
,
:migration
do
describe
AddDeployTokenTypeToDeployTokens
do
let
(
:deploy_tokens
)
{
table
(
:deploy_tokens
)
}
let
(
:deploy_token
)
do
deploy_tokens
.
create
(
name:
'token_test'
,
...
...
spec/migrations/add_foreign_key_from_notification_settings_to_users_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180710162338_add_foreign_key_from_notification_settings_to_users.rb'
)
describe
AddForeignKeyFromNotificationSettingsToUsers
,
:migration
do
describe
AddForeignKeyFromNotificationSettingsToUsers
do
let
(
:notification_settings
)
{
table
(
:notification_settings
)
}
let
(
:users
)
{
table
(
:users
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/add_foreign_keys_to_todos_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180201110056_add_foreign_keys_to_todos.rb'
)
describe
AddForeignKeysToTodos
,
:migration
do
describe
AddForeignKeysToTodos
do
let
(
:todos
)
{
table
(
:todos
)
}
let
(
:users
)
{
table
(
:users
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/add_not_null_constraint_to_project_mirror_data_foreign_key_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180508100222_add_not_null_constraint_to_project_mirror_data_foreign_key.rb'
)
describe
AddNotNullConstraintToProjectMirrorDataForeignKey
,
:migration
do
describe
AddNotNullConstraintToProjectMirrorDataForeignKey
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:import_state
)
{
table
(
:project_mirror_data
)
}
...
...
spec/migrations/add_pages_access_level_to_project_feature_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180423204600_add_pages_access_level_to_project_feature.rb'
)
describe
AddPagesAccessLevelToProjectFeature
,
:migration
do
describe
AddPagesAccessLevelToProjectFeature
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:features
)
{
table
(
:project_features
)
}
...
...
spec/migrations/add_pipeline_build_foreign_key_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180420010016_add_pipeline_build_foreign_key.rb'
)
describe
AddPipelineBuildForeignKey
,
:migration
do
describe
AddPipelineBuildForeignKey
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:pipelines
)
{
table
(
:ci_pipelines
)
}
...
...
spec/migrations/add_temporary_partial_index_on_project_id_to_services_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200114112932_add_temporary_partial_index_on_project_id_to_services.rb'
)
describe
AddTemporaryPartialIndexOnProjectIdToServices
,
:migration
do
describe
AddTemporaryPartialIndexOnProjectIdToServices
do
let
(
:migration
)
{
described_class
.
new
}
describe
'#up'
do
...
...
spec/migrations/add_unique_constraint_to_approvals_user_id_and_merge_request_id_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190404143330_add_unique_constraint_to_approvals_user_id_and_merge_request_id.rb'
)
describe
AddUniqueConstraintToApprovalsUserIdAndMergeRequestId
,
:migration
do
describe
AddUniqueConstraintToApprovalsUserIdAndMergeRequestId
do
let
(
:migration
)
{
described_class
.
new
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/add_unique_constraint_to_project_features_project_id_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180511174224_add_unique_constraint_to_project_features_project_id.rb'
)
describe
AddUniqueConstraintToProjectFeaturesProjectId
,
:migration
do
describe
AddUniqueConstraintToProjectFeaturesProjectId
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:features
)
{
table
(
:project_features
)
}
...
...
spec/migrations/assure_commits_count_for_merge_request_diff_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180425131009_assure_commits_count_for_merge_request_diff.rb'
)
describe
AssureCommitsCountForMergeRequestDiff
,
:
migration
,
:
redis
do
describe
AssureCommitsCountForMergeRequestDiff
,
:redis
do
let
(
:migration
)
{
spy
(
'migration'
)
}
before
do
...
...
spec/migrations/backfill_and_add_not_null_constraint_to_released_at_column_on_releases_table_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20190628185004_backfill_and_add_not_null_constraint_to_released_at_column_on_releases_table.rb'
)
describe
BackfillAndAddNotNullConstraintToReleasedAtColumnOnReleasesTable
,
:migration
do
describe
BackfillAndAddNotNullConstraintToReleasedAtColumnOnReleasesTable
do
let
(
:releases
)
{
table
(
:releases
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/backfill_operations_feature_flags_active_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20191213184609_backfill_operations_feature_flags_active.rb'
)
describe
BackfillOperationsFeatureFlagsActive
,
:migration
do
describe
BackfillOperationsFeatureFlagsActive
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:flags
)
{
table
(
:operations_feature_flags
)
}
...
...
spec/migrations/backfill_operations_feature_flags_iid_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200117194850_backfill_operations_feature_flags_iid.rb'
)
describe
BackfillOperationsFeatureFlagsIid
,
:migration
do
describe
BackfillOperationsFeatureFlagsIid
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:flags
)
{
table
(
:operations_feature_flags
)
}
...
...
spec/migrations/backfill_releases_name_with_tag_name_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20181212104941_backfill_releases_name_with_tag_name.rb'
)
describe
BackfillReleasesNameWithTagName
,
:migration
do
describe
BackfillReleasesNameWithTagName
do
let
(
:releases
)
{
table
(
:releases
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/backfill_releases_table_updated_at_and_add_not_null_constraints_to_timestamps_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20190920194925_backfill_releases_table_updated_at_and_add_not_null_constraints_to_timestamps.rb'
)
describe
BackfillReleasesTableUpdatedAtAndAddNotNullConstraintsToTimestamps
,
:migration
do
describe
BackfillReleasesTableUpdatedAtAndAddNotNullConstraintsToTimestamps
do
let
(
:releases
)
{
table
(
:releases
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/backfill_store_project_full_path_in_repo_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20181010133639_backfill_store_project_full_path_in_repo.rb'
)
describe
BackfillStoreProjectFullPathInRepo
,
:migration
do
describe
BackfillStoreProjectFullPathInRepo
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:group
)
{
namespaces
.
create!
(
name:
'foo'
,
path:
'foo'
)
}
...
...
spec/migrations/backport_enterprise_schema_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20190402150158_backport_enterprise_schema.rb'
)
describe
BackportEnterpriseSchema
,
:migration
,
schema:
20190329085614
do
describe
BackportEnterpriseSchema
,
schema:
20190329085614
do
include
MigrationsHelpers
def
drop_if_exists
(
table
)
...
...
spec/migrations/change_default_value_for_dsa_key_restriction_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180531220618_change_default_value_for_dsa_key_restriction.rb'
)
describe
ChangeDefaultValueForDsaKeyRestriction
,
:migration
do
describe
ChangeDefaultValueForDsaKeyRestriction
do
let
(
:application_settings
)
{
table
(
:application_settings
)
}
before
do
...
...
spec/migrations/change_outbound_local_requests_whitelist_default_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20190725012225_change_outbound_local_requests_whitelist_default.rb'
)
describe
ChangeOutboundLocalRequestsWhitelistDefault
,
:migration
do
describe
ChangeOutboundLocalRequestsWhitelistDefault
do
let
(
:application_settings
)
{
table
(
:application_settings
)
}
it
'defaults to empty array'
do
...
...
spec/migrations/change_packages_size_defaults_in_project_statistics_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20190516155724_change_packages_size_defaults_in_project_statistics.rb'
)
describe
ChangePackagesSizeDefaultsInProjectStatistics
,
:migration
do
describe
ChangePackagesSizeDefaultsInProjectStatistics
do
let
(
:project_statistics
)
{
table
(
:project_statistics
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/clean_grafana_url_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20200214085940_clean_grafana_url.rb'
)
describe
CleanGrafanaUrl
,
:migration
do
describe
CleanGrafanaUrl
do
let
(
:application_settings_table
)
{
table
(
:application_settings
)
}
[
...
...
spec/migrations/clean_up_noteable_id_for_notes_on_commits_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190313092516_clean_up_noteable_id_for_notes_on_commits.rb'
)
describe
CleanUpNoteableIdForNotesOnCommits
,
:migration
do
describe
CleanUpNoteableIdForNotesOnCommits
do
let
(
:notes
)
{
table
(
:notes
)
}
before
do
...
...
spec/migrations/cleanup_build_stage_migration_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180420010616_cleanup_build_stage_migration.rb'
)
describe
CleanupBuildStageMigration
,
:
migration
,
:
redis
do
describe
CleanupBuildStageMigration
,
:redis
do
let
(
:migration
)
{
spy
(
'migration'
)
}
before
do
...
...
spec/migrations/cleanup_environments_external_url_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20181108091549_cleanup_environments_external_url.rb'
)
describe
CleanupEnvironmentsExternalUrl
,
:migration
do
describe
CleanupEnvironmentsExternalUrl
do
let
(
:environments
)
{
table
(
:environments
)
}
let
(
:invalid_entries
)
{
environments
.
where
(
environments
.
arel_table
[
:external_url
].
matches
(
'javascript://%'
))
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
...
...
spec/migrations/cleanup_legacy_artifact_migration_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20190104182041_cleanup_legacy_artifact_migration.rb'
)
describe
CleanupLegacyArtifactMigration
,
:
migration
,
:
redis
do
describe
CleanupLegacyArtifactMigration
,
:redis
do
let
(
:migration
)
{
spy
(
'migration'
)
}
context
'when still legacy artifacts exist'
do
...
...
spec/migrations/cleanup_optimistic_locking_nulls_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200128210353_cleanup_optimistic_locking_nulls'
)
describe
CleanupOptimisticLockingNulls
,
:migration
do
describe
CleanupOptimisticLockingNulls
do
TABLES
=
%w(epics merge_requests issues)
.
freeze
TABLES
.
each
do
|
table
|
let
(
table
.
to_sym
)
{
table
(
table
.
to_sym
)
}
...
...
spec/migrations/cleanup_stages_position_migration_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180604123514_cleanup_stages_position_migration.rb'
)
describe
CleanupStagesPositionMigration
,
:
migration
,
:
redis
do
describe
CleanupStagesPositionMigration
,
:redis
do
let
(
:migration
)
{
spy
(
'migration'
)
}
before
do
...
...
spec/migrations/create_environment_for_self_monitoring_project_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200214214934_create_environment_for_self_monitoring_project'
)
describe
CreateEnvironmentForSelfMonitoringProject
,
:migration
do
describe
CreateEnvironmentForSelfMonitoringProject
do
let
(
:application_settings_table
)
{
table
(
:application_settings
)
}
let
(
:environments
)
{
table
(
:environments
)
}
...
...
spec/migrations/create_missing_namespace_for_internal_users_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180413022611_create_missing_namespace_for_internal_users.rb'
)
describe
CreateMissingNamespaceForInternalUsers
,
:migration
do
describe
CreateMissingNamespaceForInternalUsers
do
let
(
:users
)
{
table
(
:users
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:routes
)
{
table
(
:routes
)
}
...
...
spec/migrations/delete_internal_ids_where_feature_flags_usage_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200117194900_delete_internal_ids_where_feature_flags_usage'
)
describe
DeleteInternalIdsWhereFeatureFlagsUsage
,
:migration
do
describe
DeleteInternalIdsWhereFeatureFlagsUsage
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:internal_ids
)
{
table
(
:internal_ids
)
}
...
...
spec/migrations/delete_template_services_duplicated_by_type_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20200304160801_delete_template_services_duplicated_by_type.rb'
)
describe
DeleteTemplateServicesDuplicatedByType
,
:migration
do
describe
DeleteTemplateServicesDuplicatedByType
do
let
(
:services
)
{
table
(
:services
)
}
before
do
...
...
spec/migrations/drop_activate_prometheus_services_background_jobs_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20200221144534_drop_activate_prometheus_services_background_jobs.rb'
)
describe
DropActivatePrometheusServicesBackgroundJobs
,
:sidekiq
,
:redis
,
:migration
,
schema:
2020_02_21_144534
do
describe
DropActivatePrometheusServicesBackgroundJobs
,
:sidekiq
,
:redis
,
schema:
2020_02_21_144534
do
subject
(
:migration
)
{
described_class
.
new
}
describe
'#up'
do
...
...
spec/migrations/drop_background_migration_jobs_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20200116051619_drop_background_migration_jobs.rb'
)
describe
DropBackgroundMigrationJobs
,
:sidekiq
,
:redis
,
:migration
,
schema:
2020_01_16_051619
do
describe
DropBackgroundMigrationJobs
,
:sidekiq
,
:redis
,
schema:
2020_01_16_051619
do
subject
(
:migration
)
{
described_class
.
new
}
describe
'#up'
do
...
...
spec/migrations/drop_duplicate_protected_tags_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180711103851_drop_duplicate_protected_tags.rb'
)
describe
DropDuplicateProtectedTags
,
:migration
do
describe
DropDuplicateProtectedTags
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:protected_tags
)
{
table
(
:protected_tags
)
}
...
...
spec/migrations/drop_project_ci_cd_settings_merge_trains_enabled_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191128162854_drop_project_ci_cd_settings_merge_trains_enabled.rb'
)
describe
DropProjectCiCdSettingsMergeTrainsEnabled
,
:migration
do
describe
DropProjectCiCdSettingsMergeTrainsEnabled
do
let!
(
:project_ci_cd_setting
)
{
table
(
:project_ci_cd_settings
)
}
it
'correctly migrates up and down'
do
...
...
spec/migrations/encrypt_deploy_tokens_tokens_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190711201818_encrypt_deploy_tokens_tokens.rb'
)
describe
EncryptDeployTokensTokens
,
:migration
do
describe
EncryptDeployTokensTokens
do
let
(
:migration
)
{
described_class
.
new
}
let
(
:deployment_tokens
)
{
table
(
:deploy_tokens
)
}
let
(
:plaintext
)
{
"secret-token"
}
...
...
spec/migrations/encrypt_feature_flags_clients_tokens_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190606175050_encrypt_feature_flags_clients_tokens.rb'
)
describe
EncryptFeatureFlagsClientsTokens
,
:migration
do
describe
EncryptFeatureFlagsClientsTokens
do
let
(
:migration
)
{
described_class
.
new
}
let
(
:feature_flags_clients
)
{
table
(
:operations_feature_flags_clients
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/encrypt_plaintext_attributes_on_application_settings_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20191120115530_encrypt_plaintext_attributes_on_application_settings.rb'
)
describe
EncryptPlaintextAttributesOnApplicationSettings
,
:migration
do
describe
EncryptPlaintextAttributesOnApplicationSettings
do
let
(
:migration
)
{
described_class
.
new
}
let
(
:application_settings
)
{
table
(
:application_settings
)
}
let
(
:plaintext
)
{
'secret-token'
}
...
...
spec/migrations/enqueue_reset_merge_status_second_run_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190620112608_enqueue_reset_merge_status_second_run.rb'
)
describe
EnqueueResetMergeStatusSecondRun
,
:migration
do
describe
EnqueueResetMergeStatusSecondRun
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:namespace
)
{
namespaces
.
create
(
name:
'gitlab'
,
path:
'gitlab-org'
)
}
...
...
spec/migrations/enqueue_reset_merge_status_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190528180441_enqueue_reset_merge_status.rb'
)
describe
EnqueueResetMergeStatus
,
:migration
do
describe
EnqueueResetMergeStatus
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:namespace
)
{
namespaces
.
create
(
name:
'gitlab'
,
path:
'gitlab-org'
)
}
...
...
spec/migrations/enqueue_verify_pages_domain_workers_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180216121030_enqueue_verify_pages_domain_workers'
)
describe
EnqueueVerifyPagesDomainWorkers
,
:migration
do
describe
EnqueueVerifyPagesDomainWorkers
do
around
do
|
example
|
Sidekiq
::
Testing
.
fake!
do
example
.
run
...
...
spec/migrations/fill_empty_finished_at_in_deployments_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20181030135124_fill_empty_finished_at_in_deployments'
)
describe
FillEmptyFinishedAtInDeployments
,
:migration
do
describe
FillEmptyFinishedAtInDeployments
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:environments
)
{
table
(
:environments
)
}
...
...
spec/migrations/fill_file_store_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180424151928_fill_file_store'
)
describe
FillFileStore
,
:migration
do
describe
FillFileStore
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:builds
)
{
table
(
:ci_builds
)
}
...
...
spec/migrations/fill_productivity_analytics_start_date_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20191004081520_fill_productivity_analytics_start_date.rb'
)
describe
FillProductivityAnalyticsStartDate
,
:migration
do
describe
FillProductivityAnalyticsStartDate
do
let
(
:settings_table
)
{
table
(
'application_settings'
)
}
let
(
:metrics_table
)
{
table
(
'merge_request_metrics'
)
}
...
...
spec/migrations/fix_max_pages_size_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20191213120427_fix_max_pages_size.rb'
)
describe
FixMaxPagesSize
,
:migration
do
describe
FixMaxPagesSize
do
let
(
:application_settings
)
{
table
(
:application_settings
)
}
let!
(
:default_setting
)
{
application_settings
.
create!
}
let!
(
:max_possible_setting
)
{
application_settings
.
create!
(
max_pages_size:
described_class
::
MAX_SIZE
)
}
...
...
spec/migrations/fix_null_type_labels_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190131122559_fix_null_type_labels'
)
describe
FixNullTypeLabels
,
:migration
do
describe
FixNullTypeLabels
do
let
(
:migration
)
{
described_class
.
new
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
...
...
spec/migrations/fix_pool_repository_source_project_id_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20190604184643_fix_pool_repository_source_project_id.rb'
)
describe
FixPoolRepositorySourceProjectId
,
:migration
do
describe
FixPoolRepositorySourceProjectId
do
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:pool_repositories
)
{
table
(
:pool_repositories
)
}
let
(
:shards
)
{
table
(
:shards
)
}
...
...
spec/migrations/fix_projects_without_project_feature_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200127111840_fix_projects_without_project_feature.rb'
)
describe
FixProjectsWithoutProjectFeature
,
:migration
do
describe
FixProjectsWithoutProjectFeature
do
let
(
:namespace
)
{
table
(
:namespaces
).
create
(
name:
'gitlab'
,
path:
'gitlab-org'
)
}
let!
(
:projects
)
do
...
...
spec/migrations/fix_wrong_pages_access_level_spec.rb
View file @
8e2624c5
...
...
@@ -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_might_not_need_inline
,
schema:
20190628185004
do
describe
FixWrongPagesAccessLevel
,
:sidekiq_might_not_need_inline
,
schema:
20190628185004
do
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:migration_class
)
{
described_class
::
MIGRATION
}
...
...
spec/migrations/generate_lets_encrypt_private_key_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20190524062810_generate_lets_encrypt_private_key.rb'
)
describe
GenerateLetsEncryptPrivateKey
,
:migration
do
describe
GenerateLetsEncryptPrivateKey
do
describe
'#up'
do
it
'does not fail'
do
expect
do
...
...
spec/migrations/generate_missing_routes_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180702134423_generate_missing_routes.rb'
)
describe
GenerateMissingRoutes
,
:migration
do
describe
GenerateMissingRoutes
do
describe
'#up'
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/import_common_metrics_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180831164910_import_common_metrics.rb'
)
describe
ImportCommonMetrics
,
:migration
do
describe
ImportCommonMetrics
do
describe
'#up'
do
it
"imports all prometheus metrics"
do
expect
(
PrometheusMetric
.
common
).
to
be_empty
...
...
spec/migrations/insert_project_hooks_plan_limits_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20191216183532_insert_project_hooks_plan_limits.rb'
)
describe
InsertProjectHooksPlanLimits
,
:migration
do
describe
InsertProjectHooksPlanLimits
do
let
(
:migration
)
{
described_class
.
new
}
let
(
:plans
)
{
table
(
:plans
)
}
let
(
:plan_limits
)
{
table
(
:plan_limits
)
}
...
...
spec/migrations/migrate_auto_dev_ops_domain_to_cluster_domain_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190204115450_migrate_auto_dev_ops_domain_to_cluster_domain.rb'
)
describe
MigrateAutoDevOpsDomainToClusterDomain
,
:migration
do
describe
MigrateAutoDevOpsDomainToClusterDomain
do
include
MigrationHelpers
::
ClusterHelpers
let
(
:migration
)
{
described_class
.
new
}
...
...
spec/migrations/migrate_code_owner_approval_status_to_protected_branches_in_batches_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190827102026_migrate_code_owner_approval_status_to_protected_branches_in_batches.rb'
)
describe
MigrateCodeOwnerApprovalStatusToProtectedBranchesInBatches
,
:migration
do
describe
MigrateCodeOwnerApprovalStatusToProtectedBranchesInBatches
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:protected_branches
)
{
table
(
:protected_branches
)
}
...
...
spec/migrations/migrate_discussion_id_on_promoted_epics_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190715193142_migrate_discussion_id_on_promoted_epics.rb'
)
describe
MigrateDiscussionIdOnPromotedEpics
,
:migration
do
describe
MigrateDiscussionIdOnPromotedEpics
do
let
(
:migration_class
)
{
described_class
::
MIGRATION
}
let
(
:migration_name
)
{
migration_class
.
to_s
.
demodulize
}
...
...
spec/migrations/migrate_forbidden_redirect_uris_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20181026091631_migrate_forbidden_redirect_uris.rb'
)
describe
MigrateForbiddenRedirectUris
,
:migration
do
describe
MigrateForbiddenRedirectUris
do
let
(
:oauth_application
)
{
table
(
:oauth_applications
)
}
let
(
:oauth_access_grant
)
{
table
(
:oauth_access_grants
)
}
...
...
spec/migrations/migrate_k8s_service_integration_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190517153211_migrate_k8s_service_integration.rb'
)
describe
MigrateK8sServiceIntegration
,
:migration
do
describe
MigrateK8sServiceIntegration
do
context
'template service'
do
context
'with namespace'
do
let!
(
:service
)
do
...
...
spec/migrations/migrate_legacy_artifacts_to_job_artifacts_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180816161409_migrate_legacy_artifacts_to_job_artifacts.rb'
)
describe
MigrateLegacyArtifactsToJobArtifacts
,
:migration
do
describe
MigrateLegacyArtifactsToJobArtifacts
do
let
(
:migration_class
)
{
Gitlab
::
BackgroundMigration
::
MigrateLegacyArtifacts
}
let
(
:migration_name
)
{
migration_class
.
to_s
.
demodulize
}
...
...
spec/migrations/migrate_legacy_managed_clusters_to_unmanaged_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190606163724_migrate_legacy_managed_clusters_to_unmanaged.rb'
)
describe
MigrateLegacyManagedClustersToUnmanaged
,
:migration
do
describe
MigrateLegacyManagedClustersToUnmanaged
do
let
(
:cluster_type
)
{
'project_type'
}
let
(
:created_at
)
{
1
.
hour
.
ago
}
...
...
spec/migrations/migrate_managed_clusters_with_no_token_to_unmanaged_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190613231640_migrate_managed_clusters_with_no_token_to_unmanaged.rb'
)
describe
MigrateManagedClustersWithNoTokenToUnmanaged
,
:migration
do
describe
MigrateManagedClustersWithNoTokenToUnmanaged
do
let
(
:cluster_type
)
{
'project_type'
}
let
(
:created_at
)
{
Date
.
new
(
2018
,
11
,
1
).
midnight
}
...
...
spec/migrations/migrate_null_wiki_access_levels_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180809195358_migrate_null_wiki_access_levels.rb'
)
describe
MigrateNullWikiAccessLevels
,
:migration
do
describe
MigrateNullWikiAccessLevels
do
let
(
:namespaces
)
{
table
(
'namespaces'
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:project_features
)
{
table
(
:project_features
)
}
...
...
spec/migrations/migrate_ops_feature_flags_scopes_target_user_ids_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191118211629_migrate_ops_feature_flags_scopes_target_user_ids.rb'
)
describe
MigrateOpsFeatureFlagsScopesTargetUserIds
,
:migration
do
describe
MigrateOpsFeatureFlagsScopesTargetUserIds
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:flags
)
{
table
(
:operations_feature_flags
)
}
...
...
spec/migrations/move_limits_from_plans_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20191030152934_move_limits_from_plans.rb'
)
describe
MoveLimitsFromPlans
,
:migration
do
describe
MoveLimitsFromPlans
do
let
(
:plans
)
{
table
(
:plans
)
}
let
(
:plan_limits
)
{
table
(
:plan_limits
)
}
...
...
spec/migrations/nullify_users_role_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191104142124_nullify_users_role.rb'
)
describe
NullifyUsersRole
,
:migration
do
describe
NullifyUsersRole
do
let
(
:users
)
{
table
(
:users
)
}
before
do
...
...
spec/migrations/populate_project_statistics_packages_size_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190418132125_populate_project_statistics_packages_size.rb'
)
describe
PopulateProjectStatisticsPackagesSize
,
:migration
do
describe
PopulateProjectStatisticsPackagesSize
do
let
(
:project_statistics
)
{
table
(
:project_statistics
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/populate_rule_type_on_approval_merge_request_rules_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190520201748_populate_rule_type_on_approval_merge_request_rules.rb'
)
describe
PopulateRuleTypeOnApprovalMergeRequestRules
,
:migration
do
describe
PopulateRuleTypeOnApprovalMergeRequestRules
do
let
(
:migration
)
{
described_class
.
new
}
describe
'#up'
do
...
...
spec/migrations/remove_empty_extern_uid_auth0_identities_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180220150310_remove_empty_extern_uid_auth0_identities.rb'
)
describe
RemoveEmptyExternUidAuth0Identities
,
:migration
do
describe
RemoveEmptyExternUidAuth0Identities
do
let
(
:identities
)
{
table
(
:identities
)
}
before
do
...
...
spec/migrations/remove_empty_github_service_templates_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191021101942_remove_empty_github_service_templates.rb'
)
describe
RemoveEmptyGithubServiceTemplates
,
:migration
do
describe
RemoveEmptyGithubServiceTemplates
do
subject
(
:migration
)
{
described_class
.
new
}
let
(
:services
)
do
...
...
spec/migrations/remove_packages_deprecated_dependencies_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20200210135504_remove_packages_deprecated_dependencies.rb'
)
describe
RemovePackagesDeprecatedDependencies
,
:migration
do
describe
RemovePackagesDeprecatedDependencies
do
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:packages
)
{
table
(
:packages_packages
)
}
let
(
:dependency_links
)
{
table
(
:packages_dependency_links
)
}
...
...
spec/migrations/remove_redundant_pipeline_stages_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180119121225_remove_redundant_pipeline_stages.rb'
)
describe
RemoveRedundantPipelineStages
,
:migration
do
describe
RemoveRedundantPipelineStages
do
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:pipelines
)
{
table
(
:ci_pipelines
)
}
let
(
:stages
)
{
table
(
:ci_stages
)
}
...
...
spec/migrations/remove_security_dashboard_feature_flag_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200214034836_remove_security_dashboard_feature_flag.rb'
)
describe
RemoveSecurityDashboardFeatureFlag
,
:migration
do
describe
RemoveSecurityDashboardFeatureFlag
do
let
(
:feature_gates
)
{
table
(
:feature_gates
)
}
subject
(
:migration
)
{
described_class
.
new
}
...
...
spec/migrations/rename_security_dashboard_feature_flag_to_instance_security_dashboard_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20200212014653_rename_security_dashboard_feature_flag_to_instance_security_dashboard.rb'
)
describe
RenameSecurityDashboardFeatureFlagToInstanceSecurityDashboard
,
:migration
do
describe
RenameSecurityDashboardFeatureFlagToInstanceSecurityDashboard
do
let
(
:feature_gates
)
{
table
(
:feature_gates
)
}
subject
(
:migration
)
{
described_class
.
new
}
...
...
spec/migrations/reschedule_builds_stages_migration_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180405101928_reschedule_builds_stages_migration'
)
describe
RescheduleBuildsStagesMigration
,
:migration
do
describe
RescheduleBuildsStagesMigration
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:pipelines
)
{
table
(
:ci_pipelines
)
}
...
...
spec/migrations/reschedule_commits_count_for_merge_request_diff_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20180309121820_reschedule_commits_count_for_merge_request_diff'
)
describe
RescheduleCommitsCountForMergeRequestDiff
,
:migration
do
describe
RescheduleCommitsCountForMergeRequestDiff
do
let
(
:merge_request_diffs
)
{
table
(
:merge_request_diffs
)
}
let
(
:merge_requests
)
{
table
(
:merge_requests
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/save_instance_administrators_group_id_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200210092405_save_instance_administrators_group_id'
)
describe
SaveInstanceAdministratorsGroupId
,
:migration
do
describe
SaveInstanceAdministratorsGroupId
do
let
(
:application_settings_table
)
{
table
(
:application_settings
)
}
let
(
:instance_administrators_group
)
do
...
...
spec/migrations/schedule_digest_personal_access_tokens_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180913142237_schedule_digest_personal_access_tokens.rb'
)
describe
ScheduleDigestPersonalAccessTokens
,
:migration
do
describe
ScheduleDigestPersonalAccessTokens
do
let
(
:personal_access_tokens
)
{
table
(
:personal_access_tokens
)
}
let
(
:users
)
{
table
(
:users
)
}
...
...
spec/migrations/schedule_fill_valid_time_for_pages_domain_certificates_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190524073827_schedule_fill_valid_time_for_pages_domain_certificates.rb'
)
describe
ScheduleFillValidTimeForPagesDomainCertificates
,
:migration
do
describe
ScheduleFillValidTimeForPagesDomainCertificates
do
let
(
:migration_class
)
{
described_class
::
MIGRATION
}
let
(
:migration_name
)
{
migration_class
.
to_s
.
demodulize
}
...
...
spec/migrations/schedule_migrate_security_scans_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200217225719_schedule_migrate_security_scans.rb'
)
# rubocop: disable RSpec/FactoriesInMigrationSpecs
describe
ScheduleMigrateSecurityScans
,
:
migration
,
:
sidekiq
do
describe
ScheduleMigrateSecurityScans
,
:sidekiq
do
let
(
:migration
)
{
described_class
.
new
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/schedule_pages_metadata_migration_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191002031332_schedule_pages_metadata_migration'
)
describe
SchedulePagesMetadataMigration
,
:migration
do
describe
SchedulePagesMetadataMigration
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/schedule_populate_merge_request_assignees_table_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190322132835_schedule_populate_merge_request_assignees_table.rb'
)
describe
SchedulePopulateMergeRequestAssigneesTable
,
:migration
do
describe
SchedulePopulateMergeRequestAssigneesTable
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:namespace
)
{
namespaces
.
create
(
name:
'gitlab'
,
path:
'gitlab-org'
)
}
...
...
spec/migrations/schedule_recalculate_project_authorizations_second_run_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200204113224_schedule_recalculate_project_authorizations_second_run.rb'
)
describe
ScheduleRecalculateProjectAuthorizationsSecondRun
,
:migration
do
describe
ScheduleRecalculateProjectAuthorizationsSecondRun
do
let
(
:users_table
)
{
table
(
:users
)
}
before
do
...
...
spec/migrations/schedule_recalculate_project_authorizations_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200204113223_schedule_recalculate_project_authorizations.rb'
)
describe
ScheduleRecalculateProjectAuthorizations
,
:migration
do
describe
ScheduleRecalculateProjectAuthorizations
do
let
(
:users_table
)
{
table
(
:users
)
}
let
(
:namespaces_table
)
{
table
(
:namespaces
)
}
let
(
:projects_table
)
{
table
(
:projects
)
}
...
...
spec/migrations/schedule_runners_token_encryption_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20181121111200_schedule_runners_token_encryption'
)
describe
ScheduleRunnersTokenEncryption
,
:migration
do
describe
ScheduleRunnersTokenEncryption
do
let
(
:settings
)
{
table
(
:application_settings
)
}
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
...
...
spec/migrations/schedule_set_confidential_note_events_on_webhooks_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180104131052_schedule_set_confidential_note_events_on_webhooks.rb'
)
describe
ScheduleSetConfidentialNoteEventsOnWebhooks
,
:migration
do
describe
ScheduleSetConfidentialNoteEventsOnWebhooks
do
let
(
:web_hooks_table
)
{
table
(
:web_hooks
)
}
let
(
:migration_class
)
{
Gitlab
::
BackgroundMigration
::
SetConfidentialNoteEventsOnWebhooks
}
let
(
:migration_name
)
{
migration_class
.
to_s
.
demodulize
}
...
...
spec/migrations/schedule_stages_index_migration_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180420080616_schedule_stages_index_migration'
)
describe
ScheduleStagesIndexMigration
,
:migration
do
describe
ScheduleStagesIndexMigration
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:pipelines
)
{
table
(
:ci_pipelines
)
}
...
...
spec/migrations/schedule_sync_issuables_state_id_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190214112022_schedule_sync_issuables_state_id.rb'
)
describe
ScheduleSyncIssuablesStateId
,
:migration
do
describe
ScheduleSyncIssuablesStateId
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:merge_requests
)
{
table
(
:merge_requests
)
}
...
...
spec/migrations/schedule_sync_issuables_state_id_where_nil_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190506135400_schedule_sync_issuables_state_id_where_nil'
)
describe
ScheduleSyncIssuablesStateIdWhereNil
,
:migration
do
describe
ScheduleSyncIssuablesStateIdWhereNil
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:merge_requests
)
{
table
(
:merge_requests
)
}
...
...
spec/migrations/schedule_to_archive_legacy_traces_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20180529152628_schedule_to_archive_legacy_traces'
)
describe
ScheduleToArchiveLegacyTraces
,
:migration
do
describe
ScheduleToArchiveLegacyTraces
do
include
TraceHelpers
let
(
:namespaces
)
{
table
(
:namespaces
)
}
...
...
spec/migrations/schedule_update_existing_subgroup_to_match_visibility_level_of_parent_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200110121314_schedule_update_existing_subgroup_to_match_visibility_level_of_parent.rb'
)
describe
ScheduleUpdateExistingSubgroupToMatchVisibilityLevelOfParent
,
:migration
do
describe
ScheduleUpdateExistingSubgroupToMatchVisibilityLevelOfParent
do
include
MigrationHelpers
::
NamespacesHelpers
let
(
:migration_class
)
{
described_class
::
MIGRATION
}
let
(
:migration_name
)
{
migration_class
.
to_s
.
demodulize
}
...
...
spec/migrations/services_remove_temporary_index_on_project_id_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200203104214_services_remove_temporary_index_on_project_id.rb'
)
describe
ServicesRemoveTemporaryIndexOnProjectId
,
:migration
do
describe
ServicesRemoveTemporaryIndexOnProjectId
do
let
(
:migration_instance
)
{
described_class
.
new
}
it
'adds and removes temporary partial index in up and down methods'
do
...
...
spec/migrations/set_issue_id_for_all_versions_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20190715043954_set_issue_id_for_all_versions.rb'
)
describe
SetIssueIdForAllVersions
,
:migration
do
describe
SetIssueIdForAllVersions
do
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:issues
)
{
table
(
:issues
)
}
let
(
:designs
)
{
table
(
:design_management_designs
)
}
...
...
spec/migrations/steal_fill_store_upload_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20181105201455_steal_fill_store_upload.rb'
)
describe
StealFillStoreUpload
,
:migration
do
describe
StealFillStoreUpload
do
let
(
:uploads
)
{
table
(
:uploads
)
}
describe
'#up'
do
...
...
spec/migrations/sync_issuables_state_id_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20190911251732_sync_issuables_state_id'
)
describe
SyncIssuablesStateId
,
:migration
do
describe
SyncIssuablesStateId
do
let
(
:migration
)
{
described_class
.
new
}
describe
'#up'
do
...
...
spec/migrations/truncate_user_fullname_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20190325080727_truncate_user_fullname.rb'
)
describe
TruncateUserFullname
,
:migration
do
describe
TruncateUserFullname
do
let
(
:users
)
{
table
(
:users
)
}
let
(
:user_short
)
{
create_user
(
name:
'abc'
,
email:
'test_short@example.com'
)
}
...
...
spec/migrations/update_application_setting_npm_package_requests_forwarding_default_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20200221105436_update_application_setting_npm_package_requests_forwarding_default.rb'
)
describe
UpdateApplicationSettingNpmPackageRequestsForwardingDefault
,
:migration
do
describe
UpdateApplicationSettingNpmPackageRequestsForwardingDefault
do
# Create test data - pipeline and CI/CD jobs.
let
(
:application_settings
)
{
table
(
:application_settings
)
}
...
...
spec/migrations/update_fingerprint_sha256_within_keys_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20200106071113_update_fingerprint_sha256_within_keys.rb'
)
describe
UpdateFingerprintSha256WithinKeys
,
:migration
do
describe
UpdateFingerprintSha256WithinKeys
do
let
(
:key_table
)
{
table
(
:keys
)
}
describe
'#up'
do
...
...
spec/migrations/update_minimum_password_length_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20191205084057_update_minimum_password_length'
)
describe
UpdateMinimumPasswordLength
,
:migration
do
describe
UpdateMinimumPasswordLength
do
let
(
:application_settings
)
{
table
(
:application_settings
)
}
let
(
:application_setting
)
do
application_settings
.
create!
(
...
...
spec/migrations/update_project_import_visibility_level_spec.rb
View file @
8e2624c5
...
...
@@ -3,7 +3,7 @@
require
'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'post_migrate'
,
'20181219130552_update_project_import_visibility_level.rb'
)
describe
UpdateProjectImportVisibilityLevel
,
:migration
do
describe
UpdateProjectImportVisibilityLevel
do
let
(
:namespaces
)
{
table
(
:namespaces
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:project
)
{
projects
.
find_by_name
(
name
)
}
...
...
spec/migrations/update_timestamp_softwarelicensespolicy_spec.rb
View file @
8e2624c5
...
...
@@ -4,7 +4,7 @@ require 'spec_helper'
require
Rails
.
root
.
join
(
'db'
,
'migrate'
,
'20200116175538_update_timestamp_softwarelicensespolicy.rb'
)
describe
UpdateTimestampSoftwarelicensespolicy
,
:migration
do
describe
UpdateTimestampSoftwarelicensespolicy
do
let
(
:software_licenses_policy
)
{
table
(
:software_license_policies
)
}
let
(
:projects
)
{
table
(
:projects
)
}
let
(
:licenses
)
{
table
(
:software_licenses
)
}
...
...
spec/spec_helper.rb
View file @
8e2624c5
...
...
@@ -76,12 +76,17 @@ RSpec.configure do |config|
metadata
[
:level
]
=
quality_level
.
level_for
(
location
)
metadata
[
:api
]
=
true
if
location
=~
%r{/spec/requests/api/}
# do not overwrite type if it's already set
next
if
metadata
.
key?
(
:type
)
# Do not overwrite migration if it's already set
unless
metadata
.
key?
(
:migration
)
metadata
[
:migration
]
=
true
if
metadata
[
:level
]
==
:migration
end
# Do not overwrite type if it's already set
unless
metadata
.
key?
(
:type
)
match
=
location
.
match
(
%r{/spec/([^/]+)/}
)
metadata
[
:type
]
=
match
[
1
].
singularize
.
to_sym
if
match
end
end
config
.
include
LicenseHelpers
config
.
include
ActiveJob
::
TestHelper
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment