summaryrefslogtreecommitdiff
path: root/spec/spec_helper.rb
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-13 12:57:19 +0200
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-04-25 13:36:22 +0200
commitec4423665cacfe2f0675fb8b9b5bd8dd17a77dd7 (patch)
treefe5a65b05aaf34f1aa40bdcea3c139ad6e7b91a4 /spec/spec_helper.rb
parentcc0b4e3c7612f99a6acb20b9611a10a61fa7d687 (diff)
downloadgitlab-ce-ec4423665cacfe2f0675fb8b9b5bd8dd17a77dd7.tar.gz
Gitlab::Shell works on shard name, not path
Direct disk access is done through Gitaly now, so the legacy path was deprecated. This path was used in Gitlab::Shell however. This required the refactoring in this commit. Added is the removal of direct path access on the project model, as that lookup wasn't needed anymore is most cases. Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r--spec/spec_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 53045815a6a..cc61cd7d838 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -113,10 +113,10 @@ RSpec.configure do |config|
m.call(*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'))
+ Gitlab::Shell.new.rm_directory(shard_name,
+ File.join(repository_relative_path, 'hooks'))
end
# Enable all features by default for testing