diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
commit | 983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch) | |
tree | b153cd387c14ba23bd5a07514c7c01fddf6a78a0 /spec/factories/import_failures.rb | |
parent | a2bddee2cdb38673df0e004d5b32d9f77797de64 (diff) |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'spec/factories/import_failures.rb')
-rw-r--r-- | spec/factories/import_failures.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/factories/import_failures.rb b/spec/factories/import_failures.rb new file mode 100644 index 00000000000..376b2ff39e2 --- /dev/null +++ b/spec/factories/import_failures.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +require 'securerandom' + +FactoryBot.define do + factory :import_failure do + association :project, factory: :project + + created_at { Time.parse('2020-01-01T00:00:00Z') } + exception_class { 'RuntimeError' } + exception_message { 'Something went wrong' } + source { 'method_call' } + correlation_id_value { SecureRandom.uuid } + + trait :hard_failure do + retry_count { 0 } + end + + trait :soft_failure do + retry_count { 1 } + end + end +end |