(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func TestScaleUpdateError(t *testing.T) { |
| 77 | testClient(t, func(e *cli.Engine, i *mocksdk.Interface) { |
| 78 | i.On("SystemGet").Return(fxSystem(), nil) |
| 79 | i.On("ServiceUpdate", "app1", "web", structs.ServiceUpdateOptions{Count: options.Int(3), Cpu: options.Int(5), Memory: options.Int(10)}).Return(fmt.Errorf("err1")) |
| 80 | |
| 81 | res, err := testExecute(e, "scale web --cpu 5 --memory 10 --count 3 -a app1", nil) |
| 82 | require.NoError(t, err) |
| 83 | require.Equal(t, 1, res.Code) |
| 84 | res.RequireStderr(t, []string{"ERROR: err1"}) |
| 85 | res.RequireStdout(t, []string{"Scaling web... "}) |
| 86 | }) |
| 87 | } |
| 88 | |
| 89 | func TestScaleUpdateClassic(t *testing.T) { |
| 90 | testClient(t, func(e *cli.Engine, i *mocksdk.Interface) { |
nothing calls this directly
no test coverage detected