Esempio n. 1
0
  before(function(done) {
    // init fake molecuel
    mlcl = function() {
      return this;
    };
    util.inherits(mlcl, EventEmitter);
    molecuel = new mlcl();

    molecuel.config = { };
    molecuel.config.search = {
      host: 'localhost',
      port: '9200',
      prefix: 'mlcl-api-unit'
    };
    molecuel.config.database = {
      type: 'mongodb',
      uri: 'mongodb://localhost/mlcl-api-unit'
    };
    molecuel.config.elements = {
      schemaDir: __dirname + '/definitions'
    };

    molecuel.config.collections = {
      collectionDir: __dirname + '/collections'
    };

    mongo = mlcl_database(molecuel);
    elastic = mlcl_elastic(molecuel);
    elements = mlcl_elements(molecuel);
    collections = mlcl_collections(molecuel);
    api = mlcl_api(molecuel);
    done();
  });
Esempio n. 2
0
  before(function(done) {
    // init fake molecuel
    mlcl = function() {
      return this;
    };
    util.inherits(mlcl, EventEmitter);
    molecuel = new mlcl();

    molecuel.config = { };
    molecuel.config.search = {
      hosts: ['http://localhost:9200'],
      prefix: 'mlcl-files-unit'
    };
    molecuel.config.database = {
      type: 'mongodb',
      uri: 'mongodb://localhost/mlcl-files-unit'
    };

    molecuel.config.elements = {
      schemaDir: __dirname + '/definitions'
    };

    mongo = mlcl_database(molecuel);
    elements = mlcl_elements(molecuel);
    elastic = mlcl_elastic(molecuel);
    files = mlcl_files(molecuel);
    done();
  });