mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-07-25 19:09:22 +02:00
feature/add impl (#6)
* format code * with object gen and args * add implementation * add rust generator * reset generated code * add basic output * reset output * add object * add format function * with opts * fix vec * add context to unwrap * fix arguments * with function body * first complete generation: Still missing Vec<Obj> * run full alpine * add roadmap item
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,20 +1,21 @@
|
||||
use dagger_sdk::client::connect;
|
||||
use dagger_sdk::gen::ContainerExecOpts;
|
||||
|
||||
#[test]
|
||||
fn test_example_container() {
|
||||
let client = connect().unwrap();
|
||||
|
||||
let alpine = client.container(None, None).from("alpine:3.16.2".into());
|
||||
let alpine = client.container(None).from("alpine:3.16.2".into());
|
||||
|
||||
let out = alpine
|
||||
.exec(
|
||||
Some(vec!["cat".into(), "/etc/alpine-release".into()]),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.exec(Some(ContainerExecOpts {
|
||||
args: Some(vec!["cat".into(), "/etc/alpine-release".into()]),
|
||||
stdin: None,
|
||||
redirect_stdout: None,
|
||||
redirect_stderr: None,
|
||||
experimental_privileged_nesting: None,
|
||||
}))
|
||||
.stdout();
|
||||
|
||||
assert_eq!(out, Some("3.16.2\n".to_string()))
|
||||
assert_eq!(out, "3.16.2\n".to_string())
|
||||
}
|
||||
|
Reference in New Issue
Block a user