2 unstable releases

0.2.0 Oct 6, 2023
0.1.0 Jun 7, 2023

#353 in Testing

Download history 2/week @ 2024-02-08 12/week @ 2024-02-15 56/week @ 2024-02-22 54/week @ 2024-02-29 20/week @ 2024-03-07 80/week @ 2024-03-14 152/week @ 2024-03-21 433/week @ 2024-03-28 30/week @ 2024-04-04

646 downloads per month

MIT license

26KB
547 lines

neo4j_testcontainers CI Status Crates.io Docs License: MIT Rust Version: 1.63.0

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.

Example

use testcontainers::clients::Cli;
use neo4j_testcontainers::Neo4j;

let docker = Cli::default();
let container = docker.run(Neo4j::default());
let uri = container.image().bolt_uri_ipv4();
let auth_user = container.image().user();
let auth_pass = container.image().pass();
// connect to Neo4j with the uri, user and pass

Neo4j Version

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.

Auth

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.

Environment variables

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 Labs Plugins

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.

MSRV

The crate has a minimum supported Rust version (MSRV) of 1.63.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).

License

neo4j_testcontainers is licensed under either of the following, at your option:


Dependencies

~6MB
~106K SLoC