mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-09 03:21:46 +01:00
21 lines
445 B
Rust
21 lines
445 B
Rust
use dagger_sdk::client::connect;
|
|
|
|
#[test]
|
|
fn test_example_container() {
|
|
let client = connect().unwrap();
|
|
|
|
let alpine = client.container(None, None).from("alpine:3.16.2".into());
|
|
|
|
let out = alpine
|
|
.exec(
|
|
Some(vec!["cat".into(), "/etc/alpine-release".into()]),
|
|
None,
|
|
None,
|
|
None,
|
|
None,
|
|
)
|
|
.stdout();
|
|
|
|
assert_eq!(out, Some("3.16.2\n".to_string()))
|
|
}
|