-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guice binding for SearchSnippet/get (#1279)
- Loading branch information
1 parent
18167ae
commit df3925b
Showing
2 changed files
with
86 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...n-tests/src/test/java/com/linagora/tmail/james/DistributedSearchSnippetGetMethodTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.linagora.tmail.james; | ||
|
||
import org.apache.james.JamesServerBuilder; | ||
import org.apache.james.JamesServerExtension; | ||
import org.apache.james.backends.redis.RedisExtension; | ||
import org.apache.james.jmap.rfc8621.contract.SearchSnippetGetMethodContract; | ||
import org.apache.james.jmap.rfc8621.contract.probe.DelegationProbeModule; | ||
import org.apache.james.modules.AwsS3BlobStoreExtension; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import com.linagora.tmail.blob.guice.BlobStoreConfiguration; | ||
import com.linagora.tmail.james.app.CassandraExtension; | ||
import com.linagora.tmail.james.app.DistributedJamesConfiguration; | ||
import com.linagora.tmail.james.app.DistributedServer; | ||
import com.linagora.tmail.james.app.DockerOpenSearchExtension; | ||
import com.linagora.tmail.james.app.EventBusKeysChoice; | ||
import com.linagora.tmail.james.app.RabbitMQExtension; | ||
import com.linagora.tmail.james.jmap.firebase.FirebaseModuleChooserConfiguration; | ||
import com.linagora.tmail.module.LinagoraTestJMAPServerModule; | ||
|
||
public class DistributedSearchSnippetGetMethodTest implements SearchSnippetGetMethodContract { | ||
@RegisterExtension | ||
static JamesServerExtension testExtension = new JamesServerBuilder<DistributedJamesConfiguration>(tmpDir -> | ||
DistributedJamesConfiguration.builder() | ||
.workingDirectory(tmpDir) | ||
.configurationFromClasspath() | ||
.blobStore(BlobStoreConfiguration.builder() | ||
.disableCache() | ||
.deduplication() | ||
.noCryptoConfig() | ||
.disableSingleSave() | ||
.noSecondaryS3BlobStore()) | ||
.eventBusKeysChoice(EventBusKeysChoice.REDIS) | ||
.firebaseModuleChooserConfiguration(FirebaseModuleChooserConfiguration.DISABLED) | ||
.build()) | ||
.extension(new DockerOpenSearchExtension()) | ||
.extension(new CassandraExtension()) | ||
.extension(new RabbitMQExtension()) | ||
.extension(new RedisExtension()) | ||
.extension(new AwsS3BlobStoreExtension()) | ||
.server(configuration -> DistributedServer.createServer(configuration) | ||
.overrideWith(new LinagoraTestJMAPServerModule()) | ||
.overrideWith(new DelegationProbeModule())) | ||
.build(); | ||
} |