diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-03-02 12:55:30 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-03-02 12:55:30 -0600 |
commit | e26b4f0c1e2a35331bb9ec83fdb36829f2210ba9 (patch) | |
tree | 23572e7b5d2b75175643249aded429fb6b4bcd0e | |
parent | f2464a13210fe77e2a01b1a5ef9b6466444da426 (diff) | |
download | gitlab-ce-e26b4f0c1e2a35331bb9ec83fdb36829f2210ba9.tar.gz |
Delete hooks from project with empty repositorydm-fix-api-create-file-on-empty-repo
-rw-r--r-- | spec/factories/projects.rb | 4 |
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 |