Skip to content

Commit

Permalink
Update to current testcontainers version 0.16.0 (#23)
Browse files Browse the repository at this point in the history
* Update to current testcontainers version 0.16.0

* Update MSRV lockfile
  • Loading branch information
knutwalker committed May 22, 2024
1 parent 606a2d2 commit b0d74f5
Show file tree
Hide file tree
Showing 7 changed files with 726 additions and 124 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ categories = ["development-tools::testing"]
rust-version = "1.70.0"

[dependencies]
testcontainers-modules = { version = "0.1.4", features = ["neo4j"] }
testcontainers-modules = { version = "0.4.0", features = ["neo4j"] }

[dev-dependencies]
neo4rs = "0.7.0"
testcontainers = { version = "0.15.0" }
testcontainers = { version = "0.16.7", features = ["blocking"] }
tokio = { version = "1.5.0", features = ["test-util", "macros"] }
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ The default version is `5`.
## Example

```rust
use neo4j_testcontainers::{clients::Cli, prelude::*, Neo4j};
use neo4j_testcontainers::{prelude::*, runners::SyncRunner, Neo4j};

let client = Cli::default();
let container = client.run(Neo4j::default());
let container = Neo4j::default().start();
let uri = container.image().bolt_uri_ipv4();
let auth_user = container.image().user();
let auth_pass = container.image().password();
Expand All @@ -39,14 +38,14 @@ This crate also exports a few types that are required to get you started without
// Those types are exported
pub use testcontainers_modules::{
neo4j::{Neo4j, Neo4jImage},
testcontainers::clients,
testcontainers::runners,
testcontainers::RunnableImage,
};
```

```rust
// ... on your end: use the exported types
use neo4j_testcontainers::{clients::Cli, Neo4j, RunnableImage};
use neo4j_testcontainers::{runners::SyncRunner, Neo4j, RunnableImage};
```

## Neo4j Version
Expand Down Expand Up @@ -84,12 +83,11 @@ Supported plugins are APOC, APOC Core, Bloom, Streams, Graph Data Science, and N
In order to use Neo4j Enterprise Edition for the `testcontainer`, you can configure it on the `RunnableImage`:

```rust
use neo4j_testcontainers::{clients::Cli, prelude::*, Neo4j, RunnableImage};
use neo4j_testcontainers::{prelude::*, runners::SyncRunner, Neo4j, RunnableImage};

let client = Cli::default();
let neo4j = RunnableImage::from(Neo4j::default());
let neo4j = neo4j.with_enterprise_edition().expect("license not accepted");
let container = client.run(neo4j);
let container = neo4j.start();
```

Before enabling this, have a read through the [Neo4j Licensing page][__link4] to understand the terms
Expand Down
Loading

0 comments on commit b0d74f5

Please sign in to comment.