'``Configuration._parse_link_configuration`` raises a
``ConfigurationError`` if a configured link has an alias that is not of
``types.StringTypes``.'

def test_error_on_link_alias_not_stringtypes(self):

    links = [{u'alias': [u'not', u'a', u'string'], u'local_port': 1234, u'remote_port': 5678}]
    config = dict()
    parser = FlockerConfiguration(config)
    exception = self.assertRaises(ConfigurationError, parser._parse_link_configuration, u'mysql-hybridcluster', links)
    self.assertEqual(u"Application    'mysql-hybridcluster'    has    a    config    error.    Link    alias    must    be    a    string;    got    type    'list'.", exception.message)
