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 ...@@ -20,32 +20,20 @@ def validate_storages_config
storage_validation_error("\"#{name}\" is not a valid storage name") unless storage_name_valid?(name) storage_validation_error("\"#{name}\" is not a valid storage name") unless storage_name_valid?(name)
if repository_storage.is_a?(String) if repository_storage.is_a?(String)
<<<<<<< HEAD
raise "#{name} is not a valid storage, because it has no `path` key. " \ 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" \ "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" \ "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" "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 end
if !repository_storage.is_a?(Hash) || repository_storage['path'].nil? 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") 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 end
<<<<<<< HEAD
end end
end end
def validate_storages_paths def validate_storages_paths
Gitlab.config.repositories.storages.each do |name, repository_storage| Gitlab.config.repositories.storages.each do |name, repository_storage|
=======
>>>>>>> upstream/master
parent_name, _parent_path = find_parent_path(name, repository_storage['path']) parent_name, _parent_path = find_parent_path(name, repository_storage['path'])
if parent_name if parent_name
storage_validation_error("#{name} is a nested path of #{parent_name}. Nested paths are not supported for repository storages") 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 ...@@ -50,7 +50,6 @@ Update your current configuration as follows, replacing with your storages names
}) })
``` ```
<<<<<<< HEAD
#### Git configuration #### Git configuration
Configure Git to generate packfile bitmaps (introduced in Git 2.0) on Configure Git to generate packfile bitmaps (introduced in Git 2.0) on
...@@ -62,8 +61,6 @@ cd /home/git/gitlab ...@@ -62,8 +61,6 @@ cd /home/git/gitlab
sudo -u git -H git config --global repack.writeBitmaps true sudo -u git -H git config --global repack.writeBitmaps true
``` ```
=======
>>>>>>> upstream/master
#### Nginx configuration #### Nginx configuration
Ensure you're still up-to-date with the latest NGINX configuration changes: Ensure you're still up-to-date with the latest NGINX configuration changes:
......
...@@ -12,21 +12,9 @@ describe '6_validations', lib: true do ...@@ -12,21 +12,9 @@ describe '6_validations', lib: true do
FileUtils.rm_rf('tmp/tests/paths') FileUtils.rm_rf('tmp/tests/paths')
end 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 context 'with correct settings' do
before do before do
mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/d' }) mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/d' })
>>>>>>> upstream/master
end end
context 'with invalid storage names' do context 'with invalid storage names' do
...@@ -39,7 +27,6 @@ describe '6_validations', lib: true do ...@@ -39,7 +27,6 @@ describe '6_validations', lib: true do
end end
end end
<<<<<<< HEAD
context 'with incomplete settings' do context 'with incomplete settings' do
before do before do
mock_storages('foo' => {}) mock_storages('foo' => {})
...@@ -48,11 +35,6 @@ describe '6_validations', lib: true do ...@@ -48,11 +35,6 @@ describe '6_validations', lib: true do
it 'throws an error suggesting the user to update its settings' 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.') 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 end
=======
context 'with invalid storage names' do
before do
mock_storages('name with spaces' => { 'path' => 'tmp/tests/paths/a/b/c' })
>>>>>>> upstream/master
end end
context 'with deprecated settings structure' do context 'with deprecated settings structure' do
...@@ -66,25 +48,17 @@ describe '6_validations', lib: true do ...@@ -66,25 +48,17 @@ describe '6_validations', lib: true do
end end
end end
<<<<<<< HEAD
describe 'validate_storages_paths' do describe 'validate_storages_paths' do
context 'with correct settings' do context 'with correct settings' do
before do before do
mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/d' }) mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/d' })
end 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 it 'passes through' do
expect { validate_storages_paths }.not_to raise_error expect { validate_storages_paths }.not_to raise_error
end end
end end
<<<<<<< HEAD
context 'with nested storage paths' do context 'with nested storage paths' do
before do before do
mock_storages('foo' => { 'path' => 'tmp/tests/paths/a/b/c' }, 'bar' => { 'path' => 'tmp/tests/paths/a/b/c/d' }) 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 ...@@ -93,11 +67,6 @@ describe '6_validations', lib: true do
it 'throws an error' 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.') 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 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 end
context 'with similar but un-nested storage paths' do context 'with similar but un-nested storage paths' do
......
...@@ -1964,14 +1964,8 @@ describe Project, models: true do ...@@ -1964,14 +1964,8 @@ describe Project, models: true do
storages = { storages = {
'a' => { 'path' => 'tmp/tests/storage_a' }, 'a' => { 'path' => 'tmp/tests/storage_a' },
<<<<<<< HEAD
'b' => { 'path' => 'tmp/tests/storage_b' },
}
=======
'b' => { 'path' => 'tmp/tests/storage_b' } 'b' => { 'path' => 'tmp/tests/storage_b' }
} }
>>>>>>> upstream/master
allow(Gitlab.config.repositories).to receive(:storages).and_return(storages) allow(Gitlab.config.repositories).to receive(:storages).and_return(storages)
end end
......
...@@ -107,14 +107,8 @@ describe Projects::UpdateService, services: true do ...@@ -107,14 +107,8 @@ describe Projects::UpdateService, services: true do
storages = { storages = {
'a' => { 'path' => 'tmp/tests/storage_a' }, 'a' => { 'path' => 'tmp/tests/storage_a' },
<<<<<<< HEAD
'b' => { 'path' => 'tmp/tests/storage_b' },
}
=======
'b' => { 'path' => 'tmp/tests/storage_b' } 'b' => { 'path' => 'tmp/tests/storage_b' }
} }
>>>>>>> upstream/master
allow(Gitlab.config.repositories).to receive(:storages).and_return(storages) allow(Gitlab.config.repositories).to receive(:storages).and_return(storages)
end 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