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/tasks | |
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/tasks')
-rw-r--r-- | spec/tasks/gitlab/artifacts_rake_spec.rb | 32 | ||||
-rw-r--r-- | spec/tasks/gitlab/lfs_rake_spec.rb | 4 |
2 files changed, 18 insertions, 18 deletions
diff --git a/spec/tasks/gitlab/artifacts_rake_spec.rb b/spec/tasks/gitlab/artifacts_rake_spec.rb index a30823b8875..570c7fa7503 100644 --- a/spec/tasks/gitlab/artifacts_rake_spec.rb +++ b/spec/tasks/gitlab/artifacts_rake_spec.rb @@ -18,7 +18,7 @@ describe 'gitlab:artifacts namespace rake task' do let!(:build) { create(:ci_build, :legacy_artifacts, artifacts_file_store: store, artifacts_metadata_store: store) } context 'when local storage is used' do - let(:store) { ObjectStoreUploader::LOCAL_STORE } + let(:store) { ObjectStorage::Store::LOCAL } context 'and job does not have file store defined' do let(:object_storage_enabled) { true } @@ -27,8 +27,8 @@ describe 'gitlab:artifacts namespace rake task' do it "migrates file to remote storage" do subject - expect(build.reload.artifacts_file_store).to eq(ObjectStoreUploader::REMOTE_STORE) - expect(build.reload.artifacts_metadata_store).to eq(ObjectStoreUploader::REMOTE_STORE) + expect(build.reload.artifacts_file_store).to eq(ObjectStorage::Store::REMOTE) + expect(build.reload.artifacts_metadata_store).to eq(ObjectStorage::Store::REMOTE) end end @@ -38,8 +38,8 @@ describe 'gitlab:artifacts namespace rake task' do it "migrates file to remote storage" do subject - expect(build.reload.artifacts_file_store).to eq(ObjectStoreUploader::REMOTE_STORE) - expect(build.reload.artifacts_metadata_store).to eq(ObjectStoreUploader::REMOTE_STORE) + expect(build.reload.artifacts_file_store).to eq(ObjectStorage::Store::REMOTE) + expect(build.reload.artifacts_metadata_store).to eq(ObjectStorage::Store::REMOTE) end end @@ -47,8 +47,8 @@ describe 'gitlab:artifacts namespace rake task' do it "fails to migrate to remote storage" do subject - expect(build.reload.artifacts_file_store).to eq(ObjectStoreUploader::LOCAL_STORE) - expect(build.reload.artifacts_metadata_store).to eq(ObjectStoreUploader::LOCAL_STORE) + expect(build.reload.artifacts_file_store).to eq(ObjectStorage::Store::LOCAL) + expect(build.reload.artifacts_metadata_store).to eq(ObjectStorage::Store::LOCAL) end end end @@ -56,13 +56,13 @@ describe 'gitlab:artifacts namespace rake task' do context 'when remote storage is used' do let(:object_storage_enabled) { true } - let(:store) { ObjectStoreUploader::REMOTE_STORE } + let(:store) { ObjectStorage::Store::REMOTE } it "file stays on remote storage" do subject - expect(build.reload.artifacts_file_store).to eq(ObjectStoreUploader::REMOTE_STORE) - expect(build.reload.artifacts_metadata_store).to eq(ObjectStoreUploader::REMOTE_STORE) + expect(build.reload.artifacts_file_store).to eq(ObjectStorage::Store::REMOTE) + expect(build.reload.artifacts_metadata_store).to eq(ObjectStorage::Store::REMOTE) end end end @@ -72,7 +72,7 @@ describe 'gitlab:artifacts namespace rake task' do let!(:artifact) { create(:ci_job_artifact, :archive, file_store: store) } context 'when local storage is used' do - let(:store) { ObjectStoreUploader::LOCAL_STORE } + let(:store) { ObjectStorage::Store::LOCAL } context 'and job does not have file store defined' do let(:object_storage_enabled) { true } @@ -81,7 +81,7 @@ describe 'gitlab:artifacts namespace rake task' do it "migrates file to remote storage" do subject - expect(artifact.reload.file_store).to eq(ObjectStoreUploader::REMOTE_STORE) + expect(artifact.reload.file_store).to eq(ObjectStorage::Store::REMOTE) end end @@ -91,7 +91,7 @@ describe 'gitlab:artifacts namespace rake task' do it "migrates file to remote storage" do subject - expect(artifact.reload.file_store).to eq(ObjectStoreUploader::REMOTE_STORE) + expect(artifact.reload.file_store).to eq(ObjectStorage::Store::REMOTE) end end @@ -99,19 +99,19 @@ describe 'gitlab:artifacts namespace rake task' do it "fails to migrate to remote storage" do subject - expect(artifact.reload.file_store).to eq(ObjectStoreUploader::LOCAL_STORE) + expect(artifact.reload.file_store).to eq(ObjectStorage::Store::LOCAL) end end end context 'when remote storage is used' do let(:object_storage_enabled) { true } - let(:store) { ObjectStoreUploader::REMOTE_STORE } + let(:store) { ObjectStorage::Store::REMOTE } it "file stays on remote storage" do subject - expect(artifact.reload.file_store).to eq(ObjectStoreUploader::REMOTE_STORE) + expect(artifact.reload.file_store).to eq(ObjectStorage::Store::REMOTE) end end end diff --git a/spec/tasks/gitlab/lfs_rake_spec.rb b/spec/tasks/gitlab/lfs_rake_spec.rb index faed24f2010..f1b677bd6ee 100644 --- a/spec/tasks/gitlab/lfs_rake_spec.rb +++ b/spec/tasks/gitlab/lfs_rake_spec.rb @@ -6,8 +6,8 @@ describe 'gitlab:lfs namespace rake task' do end describe 'migrate' do - let(:local) { ObjectStoreUploader::LOCAL_STORE } - let(:remote) { ObjectStoreUploader::REMOTE_STORE } + let(:local) { ObjectStorage::Store::LOCAL } + let(:remote) { ObjectStorage::Store::REMOTE } let!(:lfs_object) { create(:lfs_object, :with_file, file_store: local) } def lfs_migrate |