Commit 85103270 authored by Ash McKenzie's avatar Ash McKenzie

Merge branch '221259-move-package-tasks-to-core' into 'master'

Move package tasks and fixtures to core

See merge request gitlab-org/gitlab!36512
parents 10dbf582 957f2295
# frozen_string_literal: true
module EE
module StubObjectStorage
def stub_packages_object_storage(**params)
stub_object_storage_uploader(config: ::Gitlab.config.packages.object_store,
uploader: ::Packages::PackageFileUploader,
remote_directory: 'packages',
**params)
end
def stub_dependency_proxy_object_storage(**params)
stub_object_storage_uploader(config: ::Gitlab.config.dependency_proxy.object_store,
uploader: ::DependencyProxy::FileUploader,
remote_directory: 'dependency_proxy',
**params)
end
def stub_object_storage_pseudonymizer
stub_object_storage(connection_params: Pseudonymizer::Uploader.object_store_credentials,
remote_directory: Pseudonymizer::Uploader.remote_directory)
end
end
end
# frozen_string_literal: true # frozen_string_literal: true
module StubObjectStorage module StubObjectStorage
def stub_packages_object_storage(**params)
stub_object_storage_uploader(config: ::Gitlab.config.packages.object_store,
uploader: ::Packages::PackageFileUploader,
remote_directory: 'packages',
**params)
end
def stub_dependency_proxy_object_storage(**params)
stub_object_storage_uploader(config: ::Gitlab.config.dependency_proxy.object_store,
uploader: ::DependencyProxy::FileUploader,
remote_directory: 'dependency_proxy',
**params)
end
def stub_object_storage_pseudonymizer
stub_object_storage(connection_params: Pseudonymizer::Uploader.object_store_credentials,
remote_directory: Pseudonymizer::Uploader.remote_directory)
end
def stub_object_storage_uploader( def stub_object_storage_uploader(
config:, config:,
uploader:, uploader:,
...@@ -89,8 +108,3 @@ module StubObjectStorage ...@@ -89,8 +108,3 @@ module StubObjectStorage
EOS EOS
end end
end end
require_relative '../../../ee/spec/support/helpers/ee/stub_object_storage' if
Dir.exist?("#{__dir__}/../../../ee")
StubObjectStorage.prepend_if_ee('EE::StubObjectStorage')
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