diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/factories/ci/pipeline_artifacts.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/factories/ci/pipeline_artifacts.rb')
-rw-r--r-- | spec/factories/ci/pipeline_artifacts.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/factories/ci/pipeline_artifacts.rb b/spec/factories/ci/pipeline_artifacts.rb new file mode 100644 index 00000000000..ecfd1e79e78 --- /dev/null +++ b/spec/factories/ci/pipeline_artifacts.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :ci_pipeline_artifact, class: 'Ci::PipelineArtifact' do + pipeline factory: :ci_pipeline + project { pipeline.project } + file_type { :code_coverage } + file_format { :raw } + file_store { Ci::PipelineArtifact::FILE_STORE_SUPPORTED.first } + size { 1.megabytes } + + after(:build) do |artifact, _evaluator| + artifact.file = fixture_file_upload( + Rails.root.join('spec/fixtures/pipeline_artifacts/code_coverage.json'), 'application/json') + end + end +end |