expect{validate_storages_config}.toraise_error('"name with spaces" is not a valid storage name. Please fix this in your gitlab.yml before starting GitLab.')
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_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
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_config}.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\nFor source installations, update your config/gitlab.yml Refer to gitlab.yml.example for an updated example.\n\nIf you're using the Gitlab Development Kit, you can update your configuration running `gdk reconfigure`.\n")