mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-12-25 19:43:40 +01:00
30 lines
763 B
Rust
30 lines
763 B
Rust
use dagger_sdk::{ContainerWithExposedPortOpts, NetworkProtocol};
|
|
|
|
#[tokio::test]
|
|
async fn test_issue_30_alt() -> eyre::Result<()> {
|
|
let client = dagger_sdk::connect().await?;
|
|
|
|
client
|
|
.container()
|
|
.from("denoland/deno:debian-1.30.3")
|
|
.with_exposed_port_opts(
|
|
53,
|
|
ContainerWithExposedPortOpts {
|
|
protocol: Some(NetworkProtocol::TCP),
|
|
description: None,
|
|
},
|
|
)
|
|
.with_exposed_port_opts(
|
|
53,
|
|
ContainerWithExposedPortOpts {
|
|
protocol: Some(NetworkProtocol::UDP),
|
|
description: None,
|
|
},
|
|
)
|
|
.with_exec(vec!["echo", "hello"])
|
|
.exit_code()
|
|
.await?;
|
|
|
|
Ok(())
|
|
}
|