diff options
Diffstat (limited to 'spec/factories/ci/job_artifacts.rb')
-rw-r--r-- | spec/factories/ci/job_artifacts.rb | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/spec/factories/ci/job_artifacts.rb b/spec/factories/ci/job_artifacts.rb index a6a87782fe7..46aaaf6aa5d 100644 --- a/spec/factories/ci/job_artifacts.rb +++ b/spec/factories/ci/job_artifacts.rb @@ -50,7 +50,37 @@ FactoryBot.define do after(:build) do |artifact, evaluator| artifact.file = fixture_file_upload( - Rails.root.join('spec/fixtures/junit.xml.gz'), 'application/x-gzip') + Rails.root.join('spec/fixtures/junit/junit.xml.gz'), 'application/x-gzip') + end + end + + trait :junit_with_ant do + file_type :junit + file_format :gzip + + after(:build) do |artifact, evaluator| + artifact.file = fixture_file_upload( + Rails.root.join('spec/fixtures/junit/junit_ant.xml.gz'), 'application/x-gzip') + end + end + + trait :junit_with_three_testsuites do + file_type :junit + file_format :gzip + + after(:build) do |artifact, evaluator| + artifact.file = fixture_file_upload( + Rails.root.join('spec/fixtures/junit/junit_with_three_testsuites.xml.gz'), 'application/x-gzip') + end + end + + trait :junit_with_corrupted_data do + file_type :junit + file_format :gzip + + after(:build) do |artifact, evaluator| + artifact.file = fixture_file_upload( + Rails.root.join('spec/fixtures/junit/junit_with_corrupted_data.xml.gz'), 'application/x-gzip') end end |