Delete hooks from project with empty repository

This commit is contained in:
Douwe Maan 2017-03-02 12:55:30 -06:00
parent f2464a1321
commit e26b4f0c1e
1 changed files with 4 additions and 0 deletions

View File

@ -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