A Testcontainers integration for Alfresco.
The alfresco-testcontainers
provides integration of Alfresco Docker containers with Testcontainers.
<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.
Follow the JUnit 4 Quickstart to customize the container to your needs.
@Rule
public AlfrescoContainer<?> alfrescoContainer = new AlfrescoContainer<>("23.2.1");
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");
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
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)