#docker #testcontainers

tc_core

Core crate of testcontainers, a library for integration-testing against docker containers from within Rust

3 releases (breaking)

0.3.0 Feb 28, 2019
0.2.0 Oct 23, 2018
0.1.0 Oct 3, 2018

#41 in Testing

46 downloads per month
Used in 20 crates (12 directly)

MIT/Apache

12KB
207 lines

Testcontainers-rs

Build Status Crates.io Docs.rs Dependabot Status

Testcontainers-rs is the official Rust language fork of http://testcontainers.org.

Usage

TL:DR: Depend on testcontainers, this will give you everything you need.

Check the integration tests on how to use the library.

Structure

The repository is structured into the several crates.

  • core: Contains the core traits and structs necessary for the testcontainers ecosystem.
  • cli_client: Contains an implementation of the Docker trait that uses the docker-CLI to issue commands.
  • The folder images contains several crates named after the respective docker image. Each crate adds support for one particular image. This allows to selectively import the images you need.

Last but not least: testcontainers: This is a meta crate that bundles all these crates together for convenient usage.

Versioning

To not make it too inconvenient, the meta crate testcontainers cannot strictly follow semver. Thus you are encouraged to at least depend on the minor version of the library, i.e. X.Y. If you are interested in this crate versioning approach, checkout the release guide.

License

Licensed under either of

at your option.

Developing

While developing, please make sure that your code is formatted using cargo-fmt. You can easily do that by using the pre-defined git hooks:

git config core.hookspath .githooks

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1MB
~24K SLoC