Neo4j image for testcontainers.
This image is based on the official Neo4j image. The default user is neo4j
and the default password is neo
. The default version is 5
.
use testcontainers::clients::Cli;
use neo4j_testcontainers::Neo4j;
let docker = Cli::default();
let container = docker.run(Neo4j::default());
let uri = Neo4j::bolt_uri_ipv4(&container);
let auth_user = container.image().user();
let auth_pass = container.image().pass();
// connect to Neo4j with the uri, user and pass
The version of the image can be set with the NEO4J_VERSION_TAG
environment variable. The default version is 5
. The available versions can be found on Docker Hub.
The used version can be retrieved with the version
method.
The default user is neo4j
and the default password is neo
.
The used user can be retrieved with the user
method. The used password can be retrieved with the pass
method.
The following environment variables are supported:
NEO4J_VERSION_TAG
: The default version of the image to use.NEO4J_TEST_USER
: The default user to use for authentication.NEO4J_TEST_PASS
: The default password to use for authentication.
Neo4j offers built-in support for Neo4j Labs plugins. The method with_neo4j_labs_plugin
can be used to define them.
Supported plugins are APOC, APOC Core, Bloom, Streams, Graph Data Science, and Neo Semantics.
The crate has a minimum supported Rust version (MSRV) of 1.60.0
.
A change in the MSRV in not considered a breaking change. For versions past 1.0.0, a change in the MSRV can be done in a minor version increment (1.1.3 -> 1.2.0) for versions before 1.0.0, a change in the MSRV can be done in a patch version increment (0.1.3 -> 0.1.4).
neo4j_testcontainers is licensed under either of the following, at your option:
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or https://opensource.org/licenses/MIT)