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

Method TestWorkdir

core/integration/container_test.go:1298–1322  ·  view source on GitHub ↗
(ctx context.Context, t *testctx.T)

Source from the content-addressed store, hash-verified

1296}
1297
1298func (ContainerSuite) TestWorkdir(ctx context.Context, t *testctx.T) {
1299 res, err := testutil.Query[struct {
1300 Container struct {
1301 From struct {
1302 Workdir string
1303 WithExec struct {
1304 Stdout string
1305 }
1306 }
1307 }
1308 }](t,
1309 `{
1310 container {
1311 from(address: "golang:1.18.2-alpine") {
1312 workdir
1313 withExec(args: ["pwd"]) {
1314 stdout
1315 }
1316 }
1317 }
1318 }`, nil)
1319 require.NoError(t, err)
1320 require.Equal(t, res.Container.From.Workdir, "/go")
1321 require.Equal(t, res.Container.From.WithExec.Stdout, "/go\n")
1322}
1323
1324func (ContainerSuite) TestWithWorkdir(ctx context.Context, t *testctx.T) {
1325 res, err := testutil.Query[struct {

Callers

nothing calls this directly

Calls 2

QueryFunction · 0.92
EqualMethod · 0.65

Tested by

no test coverage detected