mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-15 04:52:34 +01:00
22 lines
517 B
Rust
22 lines
517 B
Rust
use dagger_sdk::{connect, ContainerExecOptsBuilder};
|
|
|
|
#[tokio::test]
|
|
async fn test_example_container() {
|
|
let client = connect().await.unwrap();
|
|
|
|
let alpine = client.container().from("alpine:3.16.2");
|
|
|
|
let out = alpine
|
|
.exec_opts(
|
|
ContainerExecOptsBuilder::default()
|
|
.args(vec!["cat", "/etc/alpine-release"])
|
|
.build()
|
|
.unwrap(),
|
|
)
|
|
.stdout()
|
|
.await
|
|
.unwrap();
|
|
|
|
assert_eq!(out, "3.16.2\n".to_string())
|
|
}
|