(t *testing.T)
| 140 | } |
| 141 | |
| 142 | func TestAppsCreateError(t *testing.T) { |
| 143 | testClient(t, func(e *cli.Engine, i *mocksdk.Interface) { |
| 144 | opts := structs.AppCreateOptions{} |
| 145 | i.On("AppCreate", "app1", opts).Return(nil, fmt.Errorf("err1")) |
| 146 | |
| 147 | res, err := testExecute(e, "apps create app1", nil) |
| 148 | require.NoError(t, err) |
| 149 | require.Equal(t, 1, res.Code) |
| 150 | res.RequireStderr(t, []string{"ERROR: err1"}) |
| 151 | res.RequireStdout(t, []string{"Creating app1... "}) |
| 152 | }) |
| 153 | } |
| 154 | |
| 155 | func TestAppsCreateGeneration1(t *testing.T) { |
| 156 | testClient(t, func(e *cli.Engine, i *mocksdk.Interface) { |
nothing calls this directly
no test coverage detected