MCPcopy
hub / github.com/helm/helm / TestSubprocessPluginRuntime

Function TestSubprocessPluginRuntime

internal/plugin/runtime_subprocess_test.go:69–86  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

67}
68
69func TestSubprocessPluginRuntime(t *testing.T) {
70 p := mockSubprocessCLIPluginErrorExit(t, "foo", 56)
71
72 output, err := p.Invoke(t.Context(), &Input{
73 Message: schema.InputMessageCLIV1{
74 ExtraArgs: []string{"arg1", "arg2"},
75 // Env: []string{"FOO=bar"},
76 },
77 })
78
79 require.Error(t, err)
80 ieerr := &InvokeExecError{}
81 ok := errors.As(err, &ieerr)
82 require.True(t, ok, "expected InvokeExecError, got %T", err)
83 assert.Equal(t, 56, ieerr.ExitCode)
84
85 assert.Nil(t, output)
86}

Callers

nothing calls this directly

Calls 3

InvokeMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…