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

Function TestProcessExecValidate

pkg/api/process_test.go:122–131  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

120}
121
122func TestProcessExecValidate(t *testing.T) {
123 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {
124 p.On("AppGet", "app1").Return(nil, fmt.Errorf("no such app: app1"))
125 r, err := c.Websocket("/apps/app1/processes/pid1/exec", stdsdk.RequestOptions{})
126 require.NoError(t, err)
127 data, err := io.ReadAll(r)
128 require.NoError(t, err)
129 require.Equal(t, "ERROR: no such app: app1\n", string(data))
130 })
131}
132
133func TestProcessGet(t *testing.T) {
134 testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {

Callers

nothing calls this directly

Calls 2

WebsocketMethod · 0.80
testServerFunction · 0.70

Tested by

no test coverage detected