Skip to content

Prevent Neo4jContainer#withEnterpriseEdition from overwriting version #3497

@fbiville

Description

@fbiville

It would be nice if one could be able to write something like:

new Neo4jContainer<>(DockerImageName.parse("neo4j").withTag("4.2"))
     .withEnterpriseEdition()

instead of the current alternative:

new Neo4jContainer<>(DockerImageName.parse("neo4j").withTag("4.2-enterprise"))
     .withEnv("NEO4J_ACCEPT_LICENSE_AGREEMENT", "yes")

I cannot currently use withEnterpriseEdition as it overwrites the image name and version with the default ones.

I find the first snippet a bit easier to write and read.
Also, withEnterpriseEdition does the extra LicenseAcceptance.assertLicenseAccepted check which is not easily replicated otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions