dockertest 0.5.0

A library to control docker containers when running your integration tests.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use dockertest::{DockerTest, Source, TestBodySpecification};

#[tokio::test]
async fn test_with_tokio_test() {
    let source = Source::DockerHub;
    let mut test = DockerTest::new().with_default_source(source);

    let repo = "hello-world";
    let hello_world = TestBodySpecification::with_repository(repo);
    test.provide_container(hello_world);

    test.run_async(|ops| async move {
        ops.handle("hello-world");
    })
    .await;
}