Commit 324cd590 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Write project full path to .git/config when migrating legacy storage

parent 863148627b8c
......@@ -39,6 +39,13 @@ def execute
yield
end
# We'd need to keep track of project full path otherwise directory tree
# created with hashed storage enabled cannot be usefully imported using
# the import rake task.
if result
project.write_repository_config(:fullpath, project.full_path)
end
result
end
......
......@@ -2,7 +2,7 @@
describe Projects::HashedStorage::MigrateRepositoryService do
let(:gitlab_shell) { Gitlab::Shell.new }
let(:project) { create(:project, :empty_repo, :wiki_repo) }
let(:project) { create(:project, :repository, :wiki_repo) }
let(:service) { described_class.new(project) }
let(:legacy_storage) { Storage::LegacyProject.new(project) }
let(:hashed_storage) { Storage::HashedProject.new(project) }
......@@ -33,6 +33,12 @@
service.execute
end
it 'writes project full path to .git/config' do
service.execute
expect(project.repo.config['gitlab.fullpath']).to eq project.full_path
end
end
context 'when one move fails' do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment