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

Method TestExecWithWorkdir

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

Source from the content-addressed store, hash-verified

419}
420
421func (ContainerSuite) TestExecWithWorkdir(ctx context.Context, t *testctx.T) {
422 res, err := testutil.Query[struct {
423 Container struct {
424 From struct {
425 WithWorkdir struct {
426 WithExec struct {
427 Stdout string
428 }
429 }
430 }
431 }
432 }](t,
433 `{
434 container {
435 from(address: "`+alpineImage+`") {
436 withWorkdir(path: "/usr") {
437 withExec(args: ["pwd"]) {
438 stdout
439 }
440 }
441 }
442 }
443 }`, nil)
444 require.NoError(t, err)
445 require.Equal(t, res.Container.From.WithWorkdir.WithExec.Stdout, "/usr\n")
446}
447
448func (ContainerSuite) TestExecWithoutWorkdir(ctx context.Context, t *testctx.T) {
449 c := connect(ctx, t)

Callers

nothing calls this directly

Calls 2

QueryFunction · 0.92
EqualMethod · 0.65

Tested by

no test coverage detected