summaryrefslogtreecommitdiff
path: root/spec/factories/ci/secure_files.rb
blob: 74988202c71477a17e54ac79b1cbfec843dd4d0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

FactoryBot.define do
  factory :ci_secure_file, class: 'Ci::SecureFile' do
    sequence(:name) { |n| "file#{n}" }
    file { fixture_file_upload('spec/fixtures/ci_secure_files/upload-keystore.jks', 'application/octet-stream') }
    checksum { 'foo1234' }
    project

    trait :remote_store do
      after(:create) do |ci_secure_file|
        ci_secure_file.update!(file_store: ObjectStorage::Store::REMOTE)
      end
    end
  end
end