mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.1 KiB
33 lines
1.1 KiB
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschraenkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using MongoDB.Driver;
|
|
using MongoDB.Driver.GridFS;
|
|
using Squidex.Domain.Apps.Entities.MongoDb.FullText;
|
|
|
|
namespace Squidex.Domain.Apps.Entities.Contents.Text
|
|
{
|
|
internal class TextIndexerGrainTests_Mongo : TextIndexerGrainTestsBase
|
|
{
|
|
public override IIndexStorage Storage => CreateStorage();
|
|
|
|
private static IIndexStorage CreateStorage()
|
|
{
|
|
var mongoClient = new MongoClient("mongodb://localhost");
|
|
var mongoDatabase = mongoClient.GetDatabase("FullText");
|
|
|
|
var mongoBucket = new GridFSBucket<string>(mongoDatabase, new GridFSBucketOptions
|
|
{
|
|
BucketName = "fs"
|
|
});
|
|
|
|
var storage = new MongoIndexStorage(mongoBucket);
|
|
|
|
return storage;
|
|
}
|
|
}
|
|
}
|
|
|