wasmcloud-test-util 0.19.0

Utilities for testing wasmCloud hosts, providers, and components.
use testcontainers::{
    core::{ContainerPort, WaitFor},
    Image,
};

#[derive(Default, Debug, Clone)]
pub struct SquidProxy {
    _priv: (),
}

impl Image for SquidProxy {
    fn name(&self) -> &str {
        "ghcr.io/wasmcloud/mirrors/squid-proxy"
    }

    fn tag(&self) -> &str {
        "latest"
    }

    fn ready_conditions(&self) -> Vec<WaitFor> {
        vec![
            WaitFor::message_on_stdout("listening port: 3128"),
            WaitFor::seconds(3),
        ]
    }

    fn expose_ports(&self) -> &[ContainerPort] {
        &[ContainerPort::Tcp(3128)]
    }
}