diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 08:27:35 +0000 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/factories/packages | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) | |
download | gitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/factories/packages')
-rw-r--r-- | spec/factories/packages/build_info.rb | 11 | ||||
-rw-r--r-- | spec/factories/packages/package_file.rb | 2 | ||||
-rw-r--r-- | spec/factories/packages/package_file_build_infos.rb | 11 |
3 files changed, 23 insertions, 1 deletions
diff --git a/spec/factories/packages/build_info.rb b/spec/factories/packages/build_info.rb new file mode 100644 index 00000000000..dc6208d72a9 --- /dev/null +++ b/spec/factories/packages/build_info.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :package_build_info, class: 'Packages::BuildInfo' do + package + + trait :with_pipeline do + association :pipeline, factory: [:ci_pipeline, :with_job] + end + end +end diff --git a/spec/factories/packages/package_file.rb b/spec/factories/packages/package_file.rb index bcca48fb086..643ab8e4f95 100644 --- a/spec/factories/packages/package_file.rb +++ b/spec/factories/packages/package_file.rb @@ -15,7 +15,7 @@ FactoryBot.define do end factory :conan_package_file do - package { create(:conan_package, without_package_files: true) } + package { association(:conan_package, without_package_files: true) } transient do without_loaded_metadatum { false } diff --git a/spec/factories/packages/package_file_build_infos.rb b/spec/factories/packages/package_file_build_infos.rb new file mode 100644 index 00000000000..f83c32f4a1a --- /dev/null +++ b/spec/factories/packages/package_file_build_infos.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +FactoryBot.define do + factory :package_file_build_info, class: 'Packages::PackageFileBuildInfo' do + package_file + + trait :with_pipeline do + association :pipeline, factory: [:ci_pipeline, :with_job] + end + end +end |