mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2025-12-06 10:33:19 +01:00
feat(sdk,core): Use async runtime instead of blocking.
Default to using async runtime instead of blocking. I.e.
```rust
fn main() -> eyre::Result<()> {
// ...
client.container().from("rust").publish("somewhere")?;
// ...
}
// to
async fn main() -> eyre::Result<()> {
// ...
client.container().from("rust").publish("somewhere").await?;
// ...
}
```
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use dagger_sdk::{connect, ContainerExecOptsBuilder};
|
||||
|
||||
#[test]
|
||||
fn test_example_container() {
|
||||
#[tokio::test]
|
||||
async fn test_example_container() {
|
||||
let client = connect().unwrap();
|
||||
|
||||
let alpine = client.container().from("alpine:3.16.2");
|
||||
@@ -14,6 +14,7 @@ fn test_example_container() {
|
||||
.unwrap(),
|
||||
)
|
||||
.stdout()
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(out, "3.16.2\n".to_string())
|
||||
|
||||
Reference in New Issue
Block a user