diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/config/object_store_settings_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/config/object_store_settings_spec.rb')
-rw-r--r-- | spec/config/object_store_settings_spec.rb | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/spec/config/object_store_settings_spec.rb b/spec/config/object_store_settings_spec.rb index 1555124fe03..8ddb5652dae 100644 --- a/spec/config/object_store_settings_spec.rb +++ b/spec/config/object_store_settings_spec.rb @@ -200,33 +200,6 @@ RSpec.describe ObjectStoreSettings do expect(settings.external_diffs['object_store']).to be_nil end end - - context 'with legacy config and legacy background upload is enabled' do - let(:legacy_settings) do - { - 'enabled' => true, - 'remote_directory' => 'some-bucket', - 'proxy_download' => false - } - end - - before do - stub_env(ObjectStoreSettings::LEGACY_BACKGROUND_UPLOADS_ENV, 'lfs') - settings.lfs['object_store'] = described_class.legacy_parse(legacy_settings, 'lfs') - end - - it 'enables background_upload and disables direct_upload' do - subject - - expect(settings.artifacts['object_store']).to be_nil - expect(settings.lfs['object_store']['remote_directory']).to eq('some-bucket') - expect(settings.lfs['object_store']['bucket_prefix']).to eq(nil) - # Enable background_upload if the environment variable is available - expect(settings.lfs['object_store']['direct_upload']).to eq(false) - expect(settings.lfs['object_store']['background_upload']).to eq(true) - expect(settings.external_diffs['object_store']).to be_nil - end - end end end @@ -266,48 +239,6 @@ RSpec.describe ObjectStoreSettings do expect(settings['remote_directory']).to eq 'gitlab' expect(settings['bucket_prefix']).to eq 'artifacts' end - - context 'legacy background upload environment variable is enabled' do - before do - stub_env(ObjectStoreSettings::LEGACY_BACKGROUND_UPLOADS_ENV, 'artifacts,lfs') - end - - it 'enables background_upload and disables direct_upload' do - original_settings = Settingslogic.new({ - 'enabled' => true, - 'remote_directory' => 'artifacts' - }) - - settings = described_class.legacy_parse(original_settings, 'artifacts') - - expect(settings['enabled']).to be true - expect(settings['direct_upload']).to be false - expect(settings['background_upload']).to be true - expect(settings['remote_directory']).to eq 'artifacts' - expect(settings['bucket_prefix']).to eq nil - end - end - - context 'legacy background upload environment variable is enabled for other types' do - before do - stub_env(ObjectStoreSettings::LEGACY_BACKGROUND_UPLOADS_ENV, 'uploads,lfs') - end - - it 'enables direct_upload and disables background_upload' do - original_settings = Settingslogic.new({ - 'enabled' => true, - 'remote_directory' => 'artifacts' - }) - - settings = described_class.legacy_parse(original_settings, 'artifacts') - - expect(settings['enabled']).to be true - expect(settings['direct_upload']).to be true - expect(settings['background_upload']).to be false - expect(settings['remote_directory']).to eq 'artifacts' - expect(settings['bucket_prefix']).to eq nil - end - end end describe '.split_bucket_prefix' do |