Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-04-25 03:08:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-04-25 03:08:36 +0300
commit15e5a05bcd3525dd6c046dca2682b04532ba9bd1 (patch)
treed7336c9eab9716f541eb9548d51d4c59ff34aa3c /spec/config
parent3d911c6c1f34df47036f1d7e0838e4d5876ee923 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/config')
-rw-r--r--spec/config/object_store_settings_spec.rb16
-rw-r--r--spec/config/settings_spec.rb2
-rw-r--r--spec/config/smime_signature_settings_spec.rb6
3 files changed, 12 insertions, 12 deletions
diff --git a/spec/config/object_store_settings_spec.rb b/spec/config/object_store_settings_spec.rb
index 025966c8940..b8e46affc2a 100644
--- a/spec/config/object_store_settings_spec.rb
+++ b/spec/config/object_store_settings_spec.rb
@@ -5,7 +5,7 @@ require Rails.root.join('config', 'object_store_settings.rb')
RSpec.describe ObjectStoreSettings, feature_category: :shared do
describe '#parse!' do
- let(:settings) { Settingslogic.new(config) }
+ let(:settings) { GitlabSettings::Options.build(config) }
subject { described_class.new(settings).parse! }
@@ -68,7 +68,7 @@ RSpec.describe ObjectStoreSettings, feature_category: :shared do
expect(settings.artifacts['enabled']).to be true
expect(settings.artifacts['object_store']['enabled']).to be true
- expect(settings.artifacts['object_store']['connection']).to eq(connection)
+ expect(settings.artifacts['object_store']['connection'].to_hash).to eq(connection)
expect(settings.artifacts['object_store']['direct_upload']).to be true
expect(settings.artifacts['object_store']['proxy_download']).to be false
expect(settings.artifacts['object_store']['remote_directory']).to eq('artifacts')
@@ -78,7 +78,7 @@ RSpec.describe ObjectStoreSettings, feature_category: :shared do
expect(settings.lfs['enabled']).to be true
expect(settings.lfs['object_store']['enabled']).to be true
- expect(settings.lfs['object_store']['connection']).to eq(connection)
+ expect(settings.lfs['object_store']['connection'].to_hash).to eq(connection)
expect(settings.lfs['object_store']['direct_upload']).to be true
expect(settings.lfs['object_store']['proxy_download']).to be true
expect(settings.lfs['object_store']['remote_directory']).to eq('lfs-objects')
@@ -88,7 +88,7 @@ RSpec.describe ObjectStoreSettings, feature_category: :shared do
expect(settings.pages['enabled']).to be true
expect(settings.pages['object_store']['enabled']).to be true
- expect(settings.pages['object_store']['connection']).to eq(connection)
+ expect(settings.pages['object_store']['connection'].to_hash).to eq(connection)
expect(settings.pages['object_store']['remote_directory']).to eq('pages')
expect(settings.pages['object_store']['bucket_prefix']).to eq(nil)
expect(settings.pages['object_store']['consolidated_settings']).to be true
@@ -128,7 +128,7 @@ RSpec.describe ObjectStoreSettings, feature_category: :shared do
it 'populates artifacts CDN config' do
subject
- expect(settings.artifacts['object_store']['cdn']).to eq(cdn_config)
+ expect(settings.artifacts['object_store']['cdn'].to_hash).to eq(cdn_config)
end
end
@@ -163,7 +163,7 @@ RSpec.describe ObjectStoreSettings, feature_category: :shared do
it 'allows pages to define its own connection' do
expect { subject }.not_to raise_error
- expect(settings.pages['object_store']['connection']).to eq(pages_connection)
+ expect(settings.pages['object_store']['connection'].to_hash).to eq(pages_connection)
expect(settings.pages['object_store']['consolidated_settings']).to be_falsey
end
end
@@ -230,7 +230,7 @@ RSpec.describe ObjectStoreSettings, feature_category: :shared do
end
it 'respects original values' do
- original_settings = Settingslogic.new({
+ original_settings = GitlabSettings::Options.build({
'enabled' => true,
'remote_directory' => 'artifacts'
})
@@ -244,7 +244,7 @@ RSpec.describe ObjectStoreSettings, feature_category: :shared do
end
it 'supports bucket prefixes' do
- original_settings = Settingslogic.new({
+ original_settings = GitlabSettings::Options.build({
'enabled' => true,
'remote_directory' => 'gitlab/artifacts'
})
diff --git a/spec/config/settings_spec.rb b/spec/config/settings_spec.rb
index b464a4eee8b..d6cddc215f5 100644
--- a/spec/config/settings_spec.rb
+++ b/spec/config/settings_spec.rb
@@ -31,7 +31,7 @@ RSpec.describe Settings, feature_category: :system_access do
with_them do
before do
allow(Gitlab.config).to receive(:gitlab).and_return(
- Settingslogic.new({
+ GitlabSettings::Options.build({
'host' => host,
'https' => true,
'port' => port,
diff --git a/spec/config/smime_signature_settings_spec.rb b/spec/config/smime_signature_settings_spec.rb
index 73dca66c666..53e70f1f2cc 100644
--- a/spec/config/smime_signature_settings_spec.rb
+++ b/spec/config/smime_signature_settings_spec.rb
@@ -19,7 +19,7 @@ RSpec.describe SmimeSignatureSettings, feature_category: :shared do
context 'when providing custom values' do
it 'sets correct default values to disabled' do
- custom_settings = Settingslogic.new({})
+ custom_settings = GitlabSettings::Options.build({})
parsed_settings = described_class.parse(custom_settings)
@@ -30,7 +30,7 @@ RSpec.describe SmimeSignatureSettings, feature_category: :shared do
end
it 'enables smime with default key and cert' do
- custom_settings = Settingslogic.new({
+ custom_settings = GitlabSettings::Options.build({
'enabled' => true
})
@@ -46,7 +46,7 @@ RSpec.describe SmimeSignatureSettings, feature_category: :shared do
custom_key = '/custom/key'
custom_cert = '/custom/cert'
custom_ca_certs = '/custom/ca_certs'
- custom_settings = Settingslogic.new({
+ custom_settings = GitlabSettings::Options.build({
'enabled' => true,
'key_file' => custom_key,
'cert_file' => custom_cert,