Commit 2785b205 authored by Nick Thomas's avatar Nick Thomas

Resolve conflicts after merging upstream/master

parent 5e077b0f
......@@ -20,32 +20,20 @@ def validate_storages_config
storage_validation_error("\"#{name}\" is not a valid storage name") unless storage_name_valid?(name)
if repository_storage.is_a?(String)
<<<<<<< HEAD
raise "#{name} is not a valid storage, because it has no `path` key. " \
"It may be configured as:\n\n#{name}:\n path: #{repository_storage}\n\n" \
"For source installations, update your config/gitlab.yml Refer to gitlab.yml.example for an updated example.\n\n" \
"If you're using the Gitlab Development Kit, you can update your configuration running `gdk reconfigure`.\n"
=======
error = "#{name} is not a valid storage, because it has no `path` key. " \
"It may be configured as:\n\n#{name}:\n path: #{repository_storage}\n\n" \
"Refer to gitlab.yml.example for an updated example"
storage_validation_error(error)
>>>>>>> upstream/master
end
if !repository_storage.is_a?(Hash) || repository_storage['path'].nil?
storage_validation_error("#{name} is not a valid storage, because it has no `path` key. Refer to gitlab.yml.example for an updated example")
end
<<<<<<< HEAD
end
end
def validate_storages_paths
Gitlab.config.repositories.storages.each do |name, repository_storage|
=======
>>>>>>> upstream/master
parent_name, _parent_path = find_parent_path(name, repository_storage['path'])
if parent_name
storage_validation_error("#{name} is a nested path of #{parent_name}. Nested paths are not supported for repository storages")
......
......@@ -50,7 +50,6 @@ Update your current configuration as follows, replacing with your storages names
})
```
<<<<<<< HEAD
#### Git configuration
Configure Git to generate packfile bitmaps (introduced in Git 2.0) on
......@@ -62,8 +61,6 @@ cd /home/git/gitlab
sudo -u git -H git config --global repack.writeBitmaps true
```
=======
>>>>>>> upstream/master
#### Nginx configuration
Ensure you're still up-to-date with the latest NGINX configuration changes:
......
......@@ -12,21 +12,9 @@ describe '6_validations', lib: true do
FileUtils.rm_rf('tmp/tests/paths')
end
<<<<<<< HEAD
describe 'validate_storages_config' do
context 'with correct settings' do
before do
mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/d' })
end
it 'passes through' do
expect { validate_storages_config }.not_to raise_error
end
=======
context 'with correct settings' do
before do
mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/d' })
>>>>>>> upstream/master
end
context 'with invalid storage names' do
......@@ -39,7 +27,6 @@ describe '6_validations', lib: true do
end
end
<<<<<<< HEAD
context 'with incomplete settings' do
before do
mock_storages('foo' => {})
......@@ -48,11 +35,6 @@ describe '6_validations', lib: true do
it 'throws an error suggesting the user to update its settings' do
expect { validate_storages_config }.to raise_error('foo is not a valid storage, because it has no `path` key. Refer to gitlab.yml.example for an updated example. Please fix this in your gitlab.yml before starting GitLab.')
end
=======
context 'with invalid storage names' do
before do
mock_storages('name with spaces' => { 'path' => 'tmp/tests/paths/a/b/c' })
>>>>>>> upstream/master
end
context 'with deprecated settings structure' do
......@@ -66,25 +48,17 @@ describe '6_validations', lib: true do
end
end
<<<<<<< HEAD
describe 'validate_storages_paths' do
context 'with correct settings' do
before do
mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/d' })
end
=======
context 'with nested storage paths' do
before do
mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/c/d' })
end
>>>>>>> upstream/master
it 'passes through' do
expect { validate_storages_paths }.not_to raise_error
end
end
<<<<<<< HEAD
context 'with nested storage paths' do
before do
mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/c/d' })
......@@ -93,11 +67,6 @@ describe '6_validations', lib: true do
it 'throws an error' do
expect { validate_storages_paths }.to raise_error('bar is a nested path of foo. Nested paths are not supported for repository storages. Please fix this in your gitlab.yml before starting GitLab.')
end
=======
context 'with similar but un-nested storage paths' do
before do
mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/c2' })
>>>>>>> upstream/master
end
context 'with similar but un-nested storage paths' do
......
......@@ -1964,14 +1964,8 @@ describe Project, models: true do
storages = {
'a' => { 'path' => 'tmp/tests/storage_a' },
<<<<<<< HEAD
'b' => { 'path' => 'tmp/tests/storage_b' },
}
=======
'b' => { 'path' => 'tmp/tests/storage_b' }
}
>>>>>>> upstream/master
allow(Gitlab.config.repositories).to receive(:storages).and_return(storages)
end
......
......@@ -107,14 +107,8 @@ describe Projects::UpdateService, services: true do
storages = {
'a' => { 'path' => 'tmp/tests/storage_a' },
<<<<<<< HEAD
'b' => { 'path' => 'tmp/tests/storage_b' },
}
=======
'b' => { 'path' => 'tmp/tests/storage_b' }
}
>>>>>>> upstream/master
allow(Gitlab.config.repositories).to receive(:storages).and_return(storages)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment