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:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2019-06-06 13:05:11 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2019-06-14 14:10:02 +0300
commit679ac7f78efe91e3544d603839a12f00a414691e (patch)
treec171050b19aeea1ba755467d955f483c3ae6ebca /spec/support/helpers/test_env.rb
parentccdd66d03531d84e20256a51dd1f4da204a7fbde (diff)
Disable hooks by setting an ENV var
Prior to this change, the hooks directory got cleared. That works, but is not the way to go about it as there's a better way. Setting the env var this commits sets.
Diffstat (limited to 'spec/support/helpers/test_env.rb')
-rw-r--r--spec/support/helpers/test_env.rb14
1 files changed, 0 insertions, 14 deletions
diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb
index 06b5ecdf150..77f22d9dd24 100644
--- a/spec/support/helpers/test_env.rb
+++ b/spec/support/helpers/test_env.rb
@@ -146,19 +146,6 @@ module TestEnv
install_dir: Gitlab.config.gitlab_shell.path,
version: Gitlab::Shell.version_required,
task: 'gitlab:shell:install')
-
- # gitlab-shell hooks don't work in our test environment because they try to make internal API calls
- sabotage_gitlab_shell_hooks
- end
-
- def sabotage_gitlab_shell_hooks
- create_fake_git_hooks(Gitlab::Shell.new.hooks_path)
- end
-
- def create_fake_git_hooks(hooks_dir)
- %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
@@ -172,7 +159,6 @@ module TestEnv
task: "gitlab:gitaly:install[#{install_gitaly_args}]") do
Gitlab::SetupHelper.create_gitaly_configuration(gitaly_dir, { 'default' => repos_path }, force: true)
- create_fake_git_hooks(File.join(gitaly_dir, 'ruby/git-hooks'))
start_gitaly(gitaly_dir)
end
end