diff options
author | Nick Thomas <nick@gitlab.com> | 2017-03-08 20:04:44 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-03-08 20:04:44 +0300 |
commit | 4b1dd072c63e71f19f173c0f4f0c87e5e3cf0f13 (patch) | |
tree | cf32532deddfec33ab92b6e5b1fd5259dd291a84 | |
parent | 935574edd407ebb2f8aeeee2584da9b07850e813 (diff) |
Raise an exception if creating a test repository fails
-rw-r--r-- | spec/factories/projects.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/factories/projects.rb b/spec/factories/projects.rb index c6f91e05d83..0db2fe04edd 100644 --- a/spec/factories/projects.rb +++ b/spec/factories/projects.rb @@ -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 |