diff options
author | Douwe Maan <douwe@gitlab.com> | 2018-06-12 13:32:46 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-06-12 13:32:46 +0000 |
commit | 8b0d2283d77df0e99f5f49db3f78f6101ac1b8ef (patch) | |
tree | a3b9796d29da06ddf83fbe8dec1def9b972bec65 /spec/support | |
parent | a2785eb82e0e016c71ed3d5d7747c52e6a2e9682 (diff) | |
parent | f376347f24f24efc157d80de63381dd22d060630 (diff) | |
download | gitlab-ce-8b0d2283d77df0e99f5f49db3f78f6101ac1b8ef.tar.gz |
Merge branch 'gitaly-disk-access-3' into 'master'
Find and mark more Git disk access locations, part 2
See merge request gitlab-org/gitlab-ce!19437
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/helpers/test_env.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb index 1fef50a52ec..05a8e6206ae 100644 --- a/spec/support/helpers/test_env.rb +++ b/spec/support/helpers/test_env.rb @@ -135,6 +135,16 @@ module TestEnv install_dir: Gitlab.config.gitlab_shell.path, version: Gitlab::Shell.version_required, task: 'gitlab:shell:install') + + create_fake_git_hooks + end + + def create_fake_git_hooks + # gitlab-shell hooks don't work in our test environment because they try to make internal API calls + hooks_dir = File.join(Gitlab.config.gitlab_shell.path, 'hooks') + %w[pre-receive post-receive update].each do |hook| + File.open(File.join(hooks_dir, hook), 'w', 0755) { |f| f.puts '#!/bin/sh' } + end end def setup_gitaly |