// SPDX-FileCopyrightText: © Matteo Settenvini // SPDX-License-Identifier: EUPL-1.2 use { delegate::delegate, std::borrow::Cow, testcontainers::{ core::{ContainerPort, WaitFor}, Image, }, testcontainers_modules::minio, }; const MINIO_IMAGE_TAG: &'static str = "RELEASE.2024-09-22T00-33-43Z"; pub struct MinIO { inner: minio::MinIO, } impl Image for MinIO { fn tag(&self) -> &str { MINIO_IMAGE_TAG.into() } fn ready_conditions(&self) -> Vec { vec![WaitFor::message_on_stderr("API:")] } delegate! { to self.inner { fn name(&self) -> &str; fn expose_ports(&self) -> &[ContainerPort]; fn env_vars( &self, ) -> impl IntoIterator>, impl Into>)>; fn mounts(&self) -> impl IntoIterator; fn copy_to_sources(&self) -> impl IntoIterator; fn entrypoint(&self) -> Option<&str>; fn cmd(&self) -> impl IntoIterator>>; fn exec_after_start( &self, cs: testcontainers::core::ContainerState, ) -> Result, testcontainers::TestcontainersError>; } } } impl Default for MinIO { fn default() -> Self { Self { inner: Default::default(), } } }