(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestExecError(t *testing.T) { |
| 36 | testClient(t, func(e *cli.Engine, i *mocksdk.Interface) { |
| 37 | opts := structs.ProcessExecOptions{Tty: options.Bool(false)} |
| 38 | i.On("ProcessExec", "app1", "0123456789", "bash", mock.Anything, opts).Return(0, fmt.Errorf("err1")) |
| 39 | |
| 40 | res, err := testExecute(e, "exec 0123456789 bash -a app1", strings.NewReader("in")) |
| 41 | require.NoError(t, err) |
| 42 | require.Equal(t, 1, res.Code) |
| 43 | res.RequireStderr(t, []string{"ERROR: err1"}) |
| 44 | res.RequireStdout(t, []string{""}) |
| 45 | }) |
| 46 | } |
nothing calls this directly
no test coverage detected