mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-08 11:01:47 +01:00
19 lines
442 B
Rust
19 lines
442 B
Rust
#[cfg(test)]
|
|
mod test {
|
|
use rust::dagger;
|
|
|
|
#[test]
|
|
fn example_container() {
|
|
let client = dagger::connect().unwrap();
|
|
let alpine = client.container().from("alpine:3.16.2").unwrap();
|
|
let out = alpine
|
|
.exec(dagger::ContainerExecOpts {
|
|
args: vec!["cat", "/etc/alpine-release"],
|
|
})
|
|
.stdout()
|
|
.unwrap();
|
|
|
|
assert_eq!("3.16.2", out);
|
|
}
|
|
}
|