diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-02-02 13:59:43 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-02-28 20:58:15 +0100 |
commit | a7dae52e9d27adde427ef8aa066c0761071a3cd9 (patch) | |
tree | 8b6229e4e0afe7e71f9754089758cee8acd56cde /spec/requests | |
parent | 45d2c31643017807cb3fc66c0be6e9cad9964faf (diff) | |
download | gitlab-ce-a7dae52e9d27adde427ef8aa066c0761071a3cd9.tar.gz |
Merge branch '4163-move-uploads-to-object-storage' into 'master'
Move uploads to object storage
Closes #4163
See merge request gitlab-org/gitlab-ee!3867
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/runner_spec.rb | 8 | ||||
-rw-r--r-- | spec/requests/lfs_http_spec.rb | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb index 5c6eee09285..8086b91a488 100644 --- a/spec/requests/api/runner_spec.rb +++ b/spec/requests/api/runner_spec.rb @@ -947,7 +947,7 @@ describe API::Runner do context 'when artifacts are being stored inside of tmp path' do before do # by configuring this path we allow to pass temp file from any path - allow(JobArtifactUploader).to receive(:artifacts_upload_path).and_return('/') + allow(JobArtifactUploader).to receive(:workhorse_upload_path).and_return('/') end context 'when job has been erased' do @@ -1124,7 +1124,7 @@ describe API::Runner do # by configuring this path we allow to pass file from @tmpdir only # but all temporary files are stored in system tmp directory @tmpdir = Dir.mktmpdir - allow(JobArtifactUploader).to receive(:artifacts_upload_path).and_return(@tmpdir) + allow(JobArtifactUploader).to receive(:workhorse_upload_path).and_return(@tmpdir) end after do @@ -1153,7 +1153,7 @@ describe API::Runner do context 'when job has artifacts' do let(:job) { create(:ci_build) } - let(:store) { JobArtifactUploader::LOCAL_STORE } + let(:store) { JobArtifactUploader::Store::LOCAL } before do create(:ci_job_artifact, :archive, file_store: store, job: job) @@ -1175,7 +1175,7 @@ describe API::Runner do end context 'when artifacts are stored remotely' do - let(:store) { JobArtifactUploader::REMOTE_STORE } + let(:store) { JobArtifactUploader::Store::REMOTE } let!(:job) { create(:ci_build) } it 'download artifacts' do diff --git a/spec/requests/lfs_http_spec.rb b/spec/requests/lfs_http_spec.rb index 8bfc8693981..0a8788fd57e 100644 --- a/spec/requests/lfs_http_spec.rb +++ b/spec/requests/lfs_http_spec.rb @@ -245,7 +245,7 @@ describe 'Git LFS API and storage' do context 'when LFS uses object storage' do let(:before_get) do stub_lfs_object_storage - lfs_object.file.migrate!(LfsObjectUploader::REMOTE_STORE) + lfs_object.file.migrate!(LfsObjectUploader::Store::REMOTE) end it 'responds with redirect' do @@ -975,7 +975,7 @@ describe 'Git LFS API and storage' do end it 'responds with status 200, location of lfs store and object details' do - expect(json_response['StoreLFSPath']).to eq("#{Gitlab.config.shared.path}/lfs-objects/tmp/upload") + expect(json_response['StoreLFSPath']).to eq(LfsObjectUploader.workhorse_upload_path) expect(json_response['LfsOid']).to eq(sample_oid) expect(json_response['LfsSize']).to eq(sample_size) end @@ -1132,7 +1132,7 @@ describe 'Git LFS API and storage' do end it 'with location of lfs store and object details' do - expect(json_response['StoreLFSPath']).to eq("#{Gitlab.config.shared.path}/lfs-objects/tmp/upload") + expect(json_response['StoreLFSPath']).to eq(LfsObjectUploader.workhorse_upload_path) expect(json_response['LfsOid']).to eq(sample_oid) expect(json_response['LfsSize']).to eq(sample_size) end @@ -1246,7 +1246,7 @@ describe 'Git LFS API and storage' do end def setup_tempfile(lfs_tmp) - upload_path = "#{Gitlab.config.lfs.storage_path}/tmp/upload" + upload_path = LfsObjectUploader.workhorse_upload_path FileUtils.mkdir_p(upload_path) FileUtils.touch(File.join(upload_path, lfs_tmp)) |