Skip to content

Latest commit

 

History

History
74 lines (48 loc) · 2.25 KB

README.md

File metadata and controls

74 lines (48 loc) · 2.25 KB

alfresco-testcontainers

A Testcontainers integration for Alfresco.

Overview

The alfresco-testcontainers provides integration of Alfresco Docker containers with Testcontainers.

Usage

<dependency>
    <groupId>org.alfresco</groupId>
    <artifactId>alfresco-testcontainers</artifactId>
    <version>0.8.0</version>
    <scope>test</scope>
</dependency>

The alfresco-testcontainers can be used with JUnit 4 or JUnit 5.

JUnit 4 Integration

Follow the JUnit 4 Quickstart to customize the container to your needs.

@Rule
public AlfrescoContainer<?> alfrescoContainer = new AlfrescoContainer<>("23.2.1");

JUnit 5 Integration

Follow the JUnit 5 Quickstart to activate @Testcontainers extension and to customize the container to your needs.

@Container
public AlfrescoContainer<?> alfrescoContainer = new AlfrescoContainer<>("23.2.1");

Usage Examples

By default, Alfresco Docker containers run with ActiveMQ disabled, but it can be enabled using method withMessagingEnabled.

AlfrescoContainer<?> alfrescoContainer = new AlfrescoContainer<>("23.2.1").withMessagingEnabled();

The AlfrescoContainer provides access to internal containers used by Alfresco, like ActiveMQ and PostgreSQL.

alfrescoContainer.getNetwork()
alfrescoContainer.getPostgreSQLContainer()
alfrescoContainer.getActivemqContainer() 

To spawn an Alfresco Enterprise container, you can use the following line of code:

AlfrescoContainer<?> alfrescoContainer = new AlfrescoContainer<>(DockerImageName.parse("quay.io/alfresco/alfresco-content-repository:23.2.1"));

Note: Accessing Alfresco Enterprise requires customer credentials for quay.io

Unavailable configurations

As of now, the AlfrescoContainer does not natively support the following containers and features:

  • Search Service
  • Transform Service
  • UI components (such as Share and ACA)