gitlab-org--gitlab-foss/spec/factories/project_repositories.rb
Douglas Barbosa Alexandre 754f66113e
Backfill project_repositories for legacy storage projects
Adds a background migration that will ensure all projects that
are on legacy storage have a row in `project_repositories`.
2018-12-18 21:13:38 -02:00

12 lines
320 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :project_repository do
project
after(:build) do |project_repository, _|
project_repository.shard_name = project_repository.project.repository_storage
project_repository.disk_path = project_repository.project.disk_path
end
end
end