MCPcopy Create free account
hub / github.com/dagger/dagger / test_input_arg

Function test_input_arg

sdk/python/tests/client/test_integration.py:53–69  ·  view source on GitHub ↗
(alpine_image: str)

Source from the content-addressed store, hash-verified

51
52
53async def test_input_arg(alpine_image: str):
54 dockerfile = f"""\
55 FROM {alpine_image}
56 ARG SPAM=spam
57 ENV SPAM=$SPAM
58 CMD printenv
59 """
60 out = await (
61 dag.directory()
62 .with_new_file("Dockerfile", dockerfile)
63 .docker_build(
64 build_args=[dagger.BuildArg("SPAM", "egg")],
65 )
66 .with_exec([])
67 .stdout()
68 )
69 assert "SPAM=egg" in out
70
71
72async def test_optionals_in_input_fields():

Callers

nothing calls this directly

Calls 5

docker_buildMethod · 0.80
stdoutMethod · 0.45
with_execMethod · 0.45
with_new_fileMethod · 0.45
directoryMethod · 0.45

Tested by

no test coverage detected