use std::borrow::Cow;
use testcontainers::{core::WaitFor, Image};
const NAME: &str = "eclipse-mosquitto";
const TAG: &str = "2.0.18";
#[derive(Debug, Default, Clone)]
pub struct Mosquitto {
_priv: (),
}
impl Image for Mosquitto {
fn name(&self) -> &str {
NAME
}
fn tag(&self) -> &str {
TAG
}
fn ready_conditions(&self) -> Vec<WaitFor> {
vec![WaitFor::message_on_stderr(format!(
"mosquitto version {TAG} running",
))]
}
fn cmd(&self) -> impl IntoIterator<Item = impl Into<Cow<'_, str>>> {
["mosquitto", "-c", "/mosquitto-no-auth.conf"]
}
}