diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-14 00:09:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-14 00:09:31 +0300 |
commit | c19dce027b11e8172105685f2a306be51fdac8d3 (patch) | |
tree | fc613edfe02d94caceb5cf58d933828480172259 /spec/uploaders/dependency_proxy | |
parent | feb61d56e7ce9ab2cd994486bbad9887c3c023f5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/uploaders/dependency_proxy')
-rw-r--r-- | spec/uploaders/dependency_proxy/file_uploader_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/uploaders/dependency_proxy/file_uploader_spec.rb b/spec/uploaders/dependency_proxy/file_uploader_spec.rb new file mode 100644 index 00000000000..724a9c42f47 --- /dev/null +++ b/spec/uploaders/dependency_proxy/file_uploader_spec.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +require 'spec_helper' + +RSpec.describe DependencyProxy::FileUploader do + let(:blob) { create(:dependency_proxy_blob) } + let(:uploader) { described_class.new(blob, :file) } + let(:path) { Gitlab.config.dependency_proxy.storage_path } + + subject { uploader } + + it_behaves_like "builds correct paths", + store_dir: %r[\h{2}/\h{2}], + cache_dir: %r[/dependency_proxy/tmp/cache], + work_dir: %r[/dependency_proxy/tmp/work] + + context 'object store is remote' do + before do + stub_dependency_proxy_object_storage + end + + include_context 'with storage', described_class::Store::REMOTE + + it_behaves_like "builds correct paths", + store_dir: %r[\h{2}/\h{2}] + end +end |