Skip to content

Commit b762d88

Browse files
committed
Revert withEnterprise behaviour to default to 4.4-enterprise
1 parent 32ee567 commit b762d88

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

modules/neo4j/src/main/java/org/testcontainers/containers/Neo4jContainer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
*/
3434
public class Neo4jContainer extends GenericContainer<Neo4jContainer> {
3535

36+
/**
37+
* The default tag (version) to use.
38+
*/
39+
private static final String ENTERPRISE_TAG_4_4 = "4.4-enterprise";
40+
3641
/**
3742
* The image defaults to the official Neo4j image: <a href="https://hub.docker.com/_/neo4j/">Neo4j</a>.
3843
*/
@@ -206,7 +211,7 @@ public Neo4jContainer withEnterpriseEdition() {
206211
String.format("Cannot use enterprise version with alternative image %s.", getDockerImageName())
207212
);
208213
}
209-
setDockerImageName(DockerImageName.parse(getDockerImageName() + ENTERPRISE_SUFFIX).asCanonicalNameString());
214+
setDockerImageName(DEFAULT_IMAGE_NAME.withTag(ENTERPRISE_TAG_4_4).asCanonicalNameString());
210215
LicenseAcceptance.assertLicenseAccepted(getDockerImageName());
211216

212217
addEnv("NEO4J_ACCEPT_LICENSE_AGREEMENT", "yes");

modules/neo4j/src/test/java/org/testcontainers/containers/Neo4jContainerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ private static void assertThatCustomPluginWasCopied(Session session) {
136136
void shouldCheckEnterpriseLicense() {
137137
assumeThat(Neo4jContainerTest.class.getResource(ACCEPTANCE_FILE_LOCATION)).isNull();
138138

139-
String expectedImageName = "neo4j:5.26-enterprise";
139+
String expectedImageName = "neo4j:4.4-enterprise";
140140

141141
assertThatExceptionOfType(IllegalStateException.class)
142-
.isThrownBy(() -> new Neo4jContainer("neo4j:5.26").withEnterpriseEdition())
142+
.isThrownBy(() -> new Neo4jContainer("neo4j:4.4").withEnterpriseEdition())
143143
.withMessageContaining("The image " + expectedImageName + " requires you to accept a license agreement.");
144144
}
145145

0 commit comments

Comments
 (0)