(alpine_image: str)
| 184 | |
| 185 | |
| 186 | async def test_container_sync(alpine_image: str): |
| 187 | base = dag.container().from_(alpine_image) |
| 188 | |
| 189 | # short cirtcut |
| 190 | with pytest.raises(dagger.QueryError, match="exit code: 1"): |
| 191 | await base.with_exec(["foobar"]).sync() |
| 192 | |
| 193 | # chaining |
| 194 | out = await (await base.with_exec(["echo", "spam"]).sync()).stdout() |
| 195 | assert out == "spam\n" |
| 196 | |
| 197 | |
| 198 | async def test_container_awaitable(alpine_image: str): |