2020-11-13 16:09:31 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
FactoryBot.define do
|
|
|
|
factory :dependency_proxy_blob, class: 'DependencyProxy::Blob' do
|
|
|
|
group
|
2021-08-26 14:10:35 -04:00
|
|
|
size { 1234 }
|
2020-11-13 16:09:31 -05:00
|
|
|
file { fixture_file_upload('spec/fixtures/dependency_proxy/a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4.gz') }
|
|
|
|
file_name { 'a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4.gz' }
|
2021-09-29 14:12:42 -04:00
|
|
|
status { :default }
|
|
|
|
|
2022-01-18 10:14:54 -05:00
|
|
|
trait :pending_destruction do
|
|
|
|
status { :pending_destruction }
|
2021-09-29 14:12:42 -04:00
|
|
|
end
|
2020-11-13 16:09:31 -05:00
|
|
|
end
|
2020-12-02 01:09:50 -05:00
|
|
|
|
|
|
|
factory :dependency_proxy_manifest, class: 'DependencyProxy::Manifest' do
|
|
|
|
group
|
2021-08-26 14:10:35 -04:00
|
|
|
size { 1234 }
|
2020-12-02 01:09:50 -05:00
|
|
|
file { fixture_file_upload('spec/fixtures/dependency_proxy/manifest') }
|
2021-02-22 13:10:55 -05:00
|
|
|
digest { 'sha256:d0710affa17fad5f466a70159cc458227bd25d4afb39514ef662ead3e6c99515' }
|
2021-09-29 14:12:42 -04:00
|
|
|
sequence(:file_name) { |n| "alpine:latest#{n}.json" }
|
2021-02-22 13:10:55 -05:00
|
|
|
content_type { 'application/vnd.docker.distribution.manifest.v2+json' }
|
2021-09-29 14:12:42 -04:00
|
|
|
status { :default }
|
|
|
|
|
2022-01-18 10:14:54 -05:00
|
|
|
trait :pending_destruction do
|
|
|
|
status { :pending_destruction }
|
2021-09-29 14:12:42 -04:00
|
|
|
end
|
2020-12-02 01:09:50 -05:00
|
|
|
end
|
2020-11-13 16:09:31 -05:00
|
|
|
end
|