teststack 0.1.0

Test utilities to run testcontainers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use testcontainers::{runners::AsyncRunner, ContainerRequest, Image};

use crate::TestContainer;

/// Run a custom container with the given configuration.
pub async fn run<I: Image + 'static>(
    request: impl Into<ContainerRequest<I>> + AsyncRunner<I>,
) -> CustomContainer {
    let container = crate::container(request).await;
    CustomContainer {
        container,
        conf: (),
    }
}

/// A custom container with no specific configuration.
pub type CustomContainer = TestContainer<()>;