summaryrefslogtreecommitdiff
path: root/spec/config
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-14 15:12:56 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-14 15:12:56 +0000
commitc014b6b4e5c33180dd5cbff1dd1bb4623d1eca80 (patch)
tree0aa4dbf0c9236ebd669b26240a18c08aef2cc50e /spec/config
parent16daf112d6cfe2c87d8837382a00d88aa8c0ff5c (diff)
downloadgitlab-ce-c014b6b4e5c33180dd5cbff1dd1bb4623d1eca80.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/config')
-rw-r--r--spec/config/object_store_settings_spec.rb69
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