@@ -52,6 +52,26 @@ describe '6_validations', lib: true do
...
@@ -52,6 +52,26 @@ describe '6_validations', lib: true do
end
end
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.")