MCPcopy Create free account
hub / github.com/convox/rack / TestAppsCreateError

Function TestAppsCreateError

pkg/cli/apps_test.go:142–153  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

140}
141
142func 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
155func TestAppsCreateGeneration1(t *testing.T) {
156 testClient(t, func(e *cli.Engine, i *mocksdk.Interface) {

Callers

nothing calls this directly

Calls 4

testClientFunction · 0.85
testExecuteFunction · 0.85
RequireStderrMethod · 0.80
RequireStdoutMethod · 0.80

Tested by

no test coverage detected