@@ -33,6 +39,7 @@ describe '6_validations', lib: true do
end
end
<<<<<<<HEAD
context'with incomplete settings'do
beforedo
mock_storages('foo'=>{})
...
...
@@ -41,6 +48,11 @@ describe '6_validations', lib: true do
it'throws an error suggesting the user to update its settings'do
expect{validate_storages_config}.toraise_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
beforedo
mock_storages('name with spaces'=>{'path'=>'tmp/tests/paths/a/b/c'})
>>>>>>>upstream/master
end
context'with deprecated settings structure'do
...
...
@@ -54,17 +66,25 @@ describe '6_validations', lib: true do
@@ -73,6 +93,11 @@ describe '6_validations', lib: true do
it'throws an error'do
expect{validate_storages_paths}.toraise_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
context'with similar but un-nested storage paths'do
...
...
@@ -86,6 +111,26 @@ describe '6_validations', lib: true do
end
end
context'with incomplete settings'do
beforedo
mock_storages('foo'=>{})
end
it'throws an error suggesting the user to update its settings'do
expect{validate_storages}.toraise_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 deprecated settings structure'do
beforedo
mock_storages('foo'=>'tmp/tests/paths/a/b/c')
end
it'throws an error suggesting the user to update its settings'do
expect{validate_storages}.toraise_error("foo is not a valid storage, because it has no `path` key. It may be configured as:\n\nfoo:\n path: tmp/tests/paths/a/b/c\n\nRefer to gitlab.yml.example for an updated example. Please fix this in your gitlab.yml before starting GitLab.")