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

Method TestStateVarImmutability

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

Source from the content-addressed store, hash-verified

667}
668
669func (ShellSuite) TestStateVarImmutability(ctx context.Context, t *testctx.T) {
670 script := `
671dir=$(directory | with-new-file /src/foo/bar foobar | directory src)
672name=$($dir | name)
673.printenv name # src/\n
674$dir | directory foo | name # foo/
675.printenv name # src/\n
676`
677 c := connect(ctx, t)
678 out, err := daggerCliBase(t, c).With(daggerShellNoMod(script)).Stdout(ctx)
679
680 require.NoError(t, err)
681 require.Equal(t, "src/\nfoo/src/\n", out)
682}
683
684func (ShellSuite) TestArgsSpread(ctx context.Context, t *testctx.T) {
685 c := connect(ctx, t)

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected