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

Method TestStateInVarUsage

core/integration/module_shell_test.go:655–667  ·  view source on GitHub ↗
(ctx context.Context, t *testctx.T)

Source from the content-addressed store, hash-verified

653}
654
655func (ShellSuite) TestStateInVarUsage(ctx context.Context, t *testctx.T) {
656 script := `
657dir=$(directory | with-new-file foo bar)
658$dir | name
659$dir | entries
660`
661 c := connect(ctx, t)
662 out, err := daggerCliBase(t, c).With(daggerShellNoMod(script)).Stdout(ctx)
663
664 require.NoError(t, err)
665 require.Contains(t, out, "/")
666 require.Contains(t, out, "foo")
667}
668
669func (ShellSuite) TestStateVarImmutability(ctx context.Context, t *testctx.T) {
670 script := `

Callers

nothing calls this directly

Calls 6

daggerCliBaseFunction · 0.85
daggerShellNoModFunction · 0.85
connectFunction · 0.70
ContainsMethod · 0.65
StdoutMethod · 0.45
WithMethod · 0.45

Tested by

no test coverage detected