summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-09-12 18:41:10 +0000
committerDouwe Maan <douwe@gitlab.com>2018-09-12 18:41:10 +0000
commitfb81210ba7079ede4451d979b8da92fcdf04a17c (patch)
tree6eac94a7f9dfd07c4f0938f32aac8ccfc9e16a91 /spec/support
parent5a9be44869f94701c103e2220a6e1ae97375bff1 (diff)
parentd3c5b07962127be3b29e4602eef51abcb4c2c7b8 (diff)
downloadgitlab-ce-fb81210ba7079ede4451d979b8da92fcdf04a17c.tar.gz
Merge branch 'clean-gitlab-git' into 'master'
Remove Rugged and shell code from Gitlab::Git Closes gitaly#1124 See merge request gitlab-org/gitlab-ce!21488
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/git_helpers.rb11
-rw-r--r--spec/support/helpers/test_env.rb4
2 files changed, 11 insertions, 4 deletions
diff --git a/spec/support/helpers/git_helpers.rb b/spec/support/helpers/git_helpers.rb
new file mode 100644
index 00000000000..fc92bc38561
--- /dev/null
+++ b/spec/support/helpers/git_helpers.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module GitHelpers
+ def project_hook_exists?(project)
+ Gitlab::GitalyClient::StorageSettings.allow_disk_access do
+ project_path = project.repository.raw_repository.path
+
+ File.exist?(File.join(project_path, 'hooks', 'post-receive'))
+ end
+ end
+end
diff --git a/spec/support/helpers/test_env.rb b/spec/support/helpers/test_env.rb
index 3f8e3ae5190..8e8ec574edb 100644
--- a/spec/support/helpers/test_env.rb
+++ b/spec/support/helpers/test_env.rb
@@ -107,10 +107,6 @@ module TestEnv
.and_call_original
end
- def disable_pre_receive
- allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([true, nil])
- end
-
# Clean /tmp/tests
#
# Keeps gitlab-shell and gitlab-test