Commit 554f22c0 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'revert-9d89dffb' into 'master'

Revert "Merge branch '221259-improve-package-factories' into 'master'"

See merge request gitlab-org/gitlab!35407
parents 17f8ade4 5c60d04a
...@@ -118,25 +118,14 @@ FactoryBot.define do ...@@ -118,25 +118,14 @@ FactoryBot.define do
end end
factory :composer_metadatum, class: 'Packages::Composer::Metadatum' do factory :composer_metadatum, class: 'Packages::Composer::Metadatum' do
package { create(:composer_package) }
target_sha { '123' }
composer_json { { name: 'foo' } }
end end
factory :package_build_info, class: 'Packages::BuildInfo' do factory :package_build_info, class: 'Packages::BuildInfo' do
package
end end
factory :package_file, class: 'Packages::PackageFile' do factory :package_file, class: 'Packages::PackageFile' do
package package
file { fixture_file_upload('spec/fixtures/packages/conan/recipe_files/conanfile.py') }
file_name { 'conanfile.py' }
file_sha1 { 'be93151dc23ac34a82752444556fe79b32c7a1ad' }
file_md5 { '12345abcde' }
size { 400.kilobytes }
factory :conan_package_file do factory :conan_package_file do
package { create(:conan_package, without_package_files: true) } package { create(:conan_package, without_package_files: true) }
...@@ -308,7 +297,6 @@ FactoryBot.define do ...@@ -308,7 +297,6 @@ FactoryBot.define do
factory :conan_file_metadatum, class: 'Packages::Conan::FileMetadatum' do factory :conan_file_metadatum, class: 'Packages::Conan::FileMetadatum' do
package_file { create(:conan_package_file, :conan_recipe_file, without_loaded_metadatum: true) } package_file { create(:conan_package_file, :conan_recipe_file, without_loaded_metadatum: true) }
recipe_revision { '0' } recipe_revision { '0' }
conan_file_type { 'recipe_file' }
trait(:recipe_file) do trait(:recipe_file) do
conan_file_type { 'recipe_file' } conan_file_type { 'recipe_file' }
...@@ -328,7 +316,7 @@ FactoryBot.define do ...@@ -328,7 +316,7 @@ FactoryBot.define do
end end
factory :packages_dependency_link, class: 'Packages::DependencyLink' do factory :packages_dependency_link, class: 'Packages::DependencyLink' do
package { create(:nuget_package) } package
dependency { create(:packages_dependency) } dependency { create(:packages_dependency) }
dependency_type { :dependencies } dependency_type { :dependencies }
...@@ -340,7 +328,6 @@ FactoryBot.define do ...@@ -340,7 +328,6 @@ FactoryBot.define do
end end
factory :nuget_dependency_link_metadatum, class: 'Packages::Nuget::DependencyLinkMetadatum' do factory :nuget_dependency_link_metadatum, class: 'Packages::Nuget::DependencyLinkMetadatum' do
dependency_link { create(:packages_dependency_link) }
target_framework { '.NETStandard2.0' } target_framework { '.NETStandard2.0' }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment