dockertest 0.5.0

A library to control docker containers when running your integration tests.
Documentation
use bollard::volume::RemoveVolumeOptions;
use futures::future::join_all;
use tracing::{event, Level};

use super::Docker;

impl Docker {
    pub async fn remove_volumes(&self, volumes: &[String]) {
        join_all(
            volumes
                .iter()
                .map(|v| {
                    event!(Level::INFO, "removing named volume: {:?}", &v);
                    let options = Some(RemoveVolumeOptions { force: true });
                    self.client.remove_volume(v, options)
                })
                .collect::<Vec<_>>(),
        )
        .await;
    }
}