(t *testing.T)
| 67 | } |
| 68 | |
| 69 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…