use of org.locationtech.geogig.storage.mongo.MongoConnectionManager in project GeoGig by boundlessgeo.
the class MongoGraphDatabaseTest method createDatabase.
@Override
protected MongoGraphDatabase createDatabase(Platform platform) throws Exception {
final IniMongoProperties properties = new IniMongoProperties();
final String uri = properties.get("mongodb.uri", String.class).or("mongodb://localhost:27017/");
final String database = properties.get("mongodb.database", String.class).or("geogig");
MongoClient client = new MongoClient(new MongoClientURI(uri));
DB db = client.getDB(database);
db.dropDatabase();
MongoConnectionManager manager = new MongoConnectionManager();
ConfigDatabase config = new TestConfigDatabase(platform);
MongoGraphDatabase mongoGraphDatabase = new MongoGraphDatabase(manager, config);
return mongoGraphDatabase;
}
Aggregations