Raise an exception if creating a test repository fails

This commit is contained in:
Nick Thomas 2017-03-08 17:04:44 +00:00
parent 935574edd4
commit 4b1dd072c6
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ FactoryGirl.define do
trait :empty_repo do
after(:create) do |project|
project.create_repository
raise "Failed to create repository!" unless project.create_repository
# We delete hooks so that gitlab-shell will not try to authenticate with
# an API that isn't running
@ -48,7 +48,7 @@ FactoryGirl.define do
trait :broken_repo do
after(:create) do |project|
project.create_repository
raise "Failed to create repository!" unless project.create_repository
FileUtils.rm_r(File.join(project.repository_storage_path, "#{project.path_with_namespace}.git", 'refs'))
end