summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorAhmad Sherif <me@ahmadsherif.com>2018-03-26 20:21:49 +0200
committerAhmad Sherif <me@ahmadsherif.com>2018-04-03 16:22:13 +0200
commitddfc661f794ca02654853a9e223b9a5f3fb983ab (patch)
tree36f308e8362e986f4990323216296c02a0eac6ff /spec/spec_helper.rb
parent141748929dd006e4b506028e44e7dfdf3988c936 (diff)
downloadgitlab-ce-ddfc661f794ca02654853a9e223b9a5f3fb983ab.tar.gz
Use shard name in Git::GitlabProjects instead of shard path
Closes gitaly#1110
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index e8cecf361ff..beabba99cf5 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -108,7 +108,8 @@ RSpec.configure do |config|
allow_any_instance_of(Gitlab::Git::GitlabProjects).to receive(:fork_repository).and_wrap_original do |m, *args|
m.call(*args)
- shard_path, repository_relative_path = args
+ shard_name, repository_relative_path = args
+ shard_path = Gitlab.config.repositories.storages.fetch(shard_name).legacy_disk_path
# We can't leave the hooks in place after a fork, as those would fail in tests
# The "internal" API is not available
FileUtils.rm_rf(File.join(shard_path, repository_relative_path, 'hooks'))