MCPcopy Index your code
hub / github.com/coder/coder / TestDevConfigCmd

Function TestDevConfigCmd

scripts/develop/main_test.go:670–685  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

668}
669
670func TestDevConfigCmd(t *testing.T) {
671 t.Parallel()
672
673 cfg := &devConfig{
674 projectRoot: "/fake/root",
675 childEnv: []string{"A=1", "B=2"},
676 }
677
678 cmd := cfg.cmd(context.Background(), "echo", "hello")
679 assert.Equal(t, "/fake/root", cmd.Dir)
680 assert.Equal(t, []string{"A=1", "B=2"}, cmd.Env)
681
682 // Verify childEnv is cloned, not shared.
683 cmd.Env = append(cmd.Env, "C=3")
684 assert.Len(t, cfg.childEnv, 2, "original childEnv must not be mutated")
685}
686
687func TestProcGroupProcessExit(t *testing.T) {
688 t.Parallel()

Callers

nothing calls this directly

Calls 3

cmdMethod · 0.95
EqualMethod · 0.45
LenMethod · 0.45

Tested by

no test coverage detected