'Add a custom instance user.'

def test_build_userdata_with_instance_user(self):

    cfg.CONF.set_override('heat_metadata_server_url', 'http://server.test:123')
    cfg.CONF.set_override('heat_watch_server_url', 'http://server.test:345')
    data = self.nova_plugin.build_userdata({}, instance_user='ec2-user')
    self.assertIn('user:    ', data)
    self.assertIn('useradd', data)
    self.assertIn('ec2-user', data)
