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:
authorDouwe Maan <douwe@selenight.nl>2017-03-02 21:55:30 +0300
committerDouwe Maan <douwe@selenight.nl>2017-03-02 21:55:30 +0300
commite26b4f0c1e2a35331bb9ec83fdb36829f2210ba9 (patch)
tree23572e7b5d2b75175643249aded429fb6b4bcd0e
parentf2464a13210fe77e2a01b1a5ef9b6466444da426 (diff)
Delete hooks from project with empty repository
-rw-r--r--spec/factories/projects.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb
index 586efdefdb3..04de3512125 100644
--- a/spec/factories/projects.rb
+++ b/spec/factories/projects.rb
@@ -39,6 +39,10 @@ FactoryGirl.define do
trait :empty_repo do
after(:create) do |project|
project.create_repository
+
+ # We delete hooks so that gitlab-shell will not try to authenticate with
+ # an API that isn't running
+ FileUtils.rm_r(File.join(project.repository_storage_path, "#{project.path_with_namespace}.git", 'hooks'))
end
end