Welcome to mirror list, hosted at ThFree Co, Russian Federation.

pipeline_artifacts.rb « ci « factories « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ecfd1e79e789e27ff689692153b1e71ae7e59aae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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