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:
Diffstat (limited to 'spec/initializers/6_validations_spec.rb')
-rw-r--r--spec/initializers/6_validations_spec.rb14
1 files changed, 5 insertions, 9 deletions
diff --git a/spec/initializers/6_validations_spec.rb b/spec/initializers/6_validations_spec.rb
index 4d317a7583e..6422dccc6d5 100644
--- a/spec/initializers/6_validations_spec.rb
+++ b/spec/initializers/6_validations_spec.rb
@@ -7,10 +7,10 @@ RSpec.describe '6_validations' do
describe 'validate_storages_config' do
context 'with correct settings' do
before do
- mock_storages(
- 'storage' => Gitlab::GitalyClient::StorageSettings.new('path' => 'tmp/tests/paths/a/b/c'),
- 'storage.with_VALID-chars01' => Gitlab::GitalyClient::StorageSettings.new('path' => 'tmp/tests/paths/a/b/d'),
- 'gitaly.c.gitlab-prd-164c.internal' => Gitlab::GitalyClient::StorageSettings.new('path' => 'tmp/tests/paths/a/b/e')
+ stub_storage_settings(
+ 'storage' => {},
+ 'storage.with_VALID-chars01' => {},
+ 'gitaly.c.gitlab-prd-164c.internal' => {}
)
end
@@ -21,7 +21,7 @@ RSpec.describe '6_validations' do
context 'with invalid storage names' do
before do
- mock_storages('name with spaces' => Gitlab::GitalyClient::StorageSettings.new('path' => 'tmp/tests/paths/a/b/c'))
+ stub_storage_settings('name with spaces' => {})
end
it 'throws an error' do
@@ -29,8 +29,4 @@ RSpec.describe '6_validations' do
end
end
end
-
- def mock_storages(storages)
- allow(Gitlab.config.repositories).to receive(:storages).and_return(storages)
- end
end