Commit 9ffb1142 authored by Robert Speicher's avatar Robert Speicher

Merge branch '23220-fail-add-repo-explicitly' into 'master'

Raise an exception if creating a test repository fails

See merge request !9815
parents 8707db80 4b1dd072
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment