Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-12-18 22:00:27 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2018-12-21 21:00:46 +0300
commit3962c7251919e86ea0ff54fa5550e6dc8467dbb2 (patch)
treed672886ad3485b464849dfb292c2b690b8092220 /spec/services
parenta0222cf81fd72c26e5ac50c240cf61c40215be37 (diff)
Update storage location after a project has been renamed
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/projects/after_rename_service_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/services/projects/after_rename_service_spec.rb b/spec/services/projects/after_rename_service_spec.rb
index b4718a07204..59c08b30f9f 100644
--- a/spec/services/projects/after_rename_service_spec.rb
+++ b/spec/services/projects/after_rename_service_spec.rb
@@ -99,6 +99,17 @@ describe Projects::AfterRenameService do
expect(rugged_config['gitlab.fullpath']).to eq(project.full_path)
end
+
+ it 'updates storage location' do
+ allow(project_storage).to receive(:rename_repo).and_return(true)
+
+ described_class.new(project).execute
+
+ expect(project.project_repository).to have_attributes(
+ disk_path: project.disk_path,
+ shard_name: project.repository_storage
+ )
+ end
end
context 'using hashed storage' do
@@ -193,6 +204,15 @@ describe Projects::AfterRenameService do
expect(rugged_config['gitlab.fullpath']).to eq(project.full_path)
end
+
+ it 'updates storage location' do
+ described_class.new(project).execute
+
+ expect(project.project_repository).to have_attributes(
+ disk_path: project.disk_path,
+ shard_name: project.repository_storage
+ )
+ end
end
end
end