Example #1
0
def main():
    riak_host = config.get_str('riak', 'host')
    riak_port = config.get_int('riak', 'port')

    riakalchemy.connect(host=riak_host, port=riak_port)
    socket = eventlet.listen(('', 9877))
    eventlet.wsgi.server(socket, application)
Example #2
0
 def setUp(self):
     if not use_system_riak:
         if not self.__class__.test_server_started:
             riakalchemy.connect(test_server=True, port=riak_port)
             riakalchemy.model._clear_test_connection()
             self.__class__.test_server_started = True
         else:
             riakalchemy.model._clear_test_connection()
     else:
         riakalchemy.connect(test_server=False, port=riak_port)
Example #3
0
    def setUp(self):
        super(TestCase, self).setUp()
        riakalchemy.connect()

        with mock.patch('surveilr.config.defaults_file') as defaults_file:
            with mock.patch('surveilr.config.config_files') as config_files:
                config_files.return_value = self.config_files()
                defaults_file.return_value = self.defaults_file()

                config.load_default_config()
Example #4
0
    def setUp(self):
        import riakalchemy

        riakalchemy.connect()
Example #5
0
 def setUp(self):
     if not use_system_riak and not self.__class__.test_server_started:
         riakalchemy.connect(test_server=True, port=riak_port)
         self.__class__.test_server_started = True
     else:
         riakalchemy.connect(test_server=False, port=riak_port)
Example #6
0
    def __init__(self, global_config):
        riak_host = config.get_str('riak', 'host')
        riak_port = config.get_int('riak', 'port')

        riakalchemy.connect(host=riak_host, port=riak_port)