From 387a4f4b2cc9cffe2a21ef1060fe35c60d1ac769 Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Fri, 22 Mar 2019 19:38:45 +0700 Subject: Remove legacy artifact related code We've already migrated all the legacy artifacts to the new realm, which is ci_job_artifacts table. It's time to remove the old code base that is no longer used. --- spec/tasks/gitlab/artifacts/migrate_rake_spec.rb | 55 ------------------------ 1 file changed, 55 deletions(-) (limited to 'spec/tasks') diff --git a/spec/tasks/gitlab/artifacts/migrate_rake_spec.rb b/spec/tasks/gitlab/artifacts/migrate_rake_spec.rb index 8544fb62b5a..be69c10d7c8 100644 --- a/spec/tasks/gitlab/artifacts/migrate_rake_spec.rb +++ b/spec/tasks/gitlab/artifacts/migrate_rake_spec.rb @@ -13,61 +13,6 @@ describe 'gitlab:artifacts namespace rake task' do subject { run_rake_task('gitlab:artifacts:migrate') } - context 'legacy artifacts' do - describe 'migrate' 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) { ObjectStorage::Store::LOCAL } - - context 'and job does not have file store defined' do - let(:object_storage_enabled) { true } - let(:store) { nil } - - it "migrates file to remote storage" do - subject - - expect(build.reload.artifacts_file_store).to eq(ObjectStorage::Store::REMOTE) - expect(build.reload.artifacts_metadata_store).to eq(ObjectStorage::Store::REMOTE) - end - end - - context 'and remote storage is defined' do - let(:object_storage_enabled) { true } - - it "migrates file to remote storage" do - subject - - expect(build.reload.artifacts_file_store).to eq(ObjectStorage::Store::REMOTE) - expect(build.reload.artifacts_metadata_store).to eq(ObjectStorage::Store::REMOTE) - end - end - - context 'and remote storage is not defined' do - it "fails to migrate to remote storage" do - subject - - 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 - - context 'when remote storage is used' do - let(:object_storage_enabled) { true } - - let(:store) { ObjectStorage::Store::REMOTE } - - it "file stays on remote storage" do - subject - - 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 - end - context 'job artifacts' do let!(:artifact) { create(:ci_job_artifact, :archive, file_store: store) } -- cgit v1.2.3