MCPcopy Index your code
hub / github.com/docker/docker-agent / TestCodeModeTool_StartStop

Function TestCodeModeTool_StartStop

pkg/tools/codemode/codemode_test.go:105–124  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

103}
104
105func TestCodeModeTool_StartStop(t *testing.T) {
106 t.Parallel()
107 inner := &testToolSet{}
108
109 tool := Wrap(inner)
110
111 assert.Equal(t, 0, inner.start)
112 assert.Equal(t, 0, inner.stop)
113
114 startable := tool.(tools.Startable)
115 err := startable.Start(t.Context())
116 require.NoError(t, err)
117 assert.Equal(t, 1, inner.start)
118 assert.Equal(t, 0, inner.stop)
119
120 err = startable.Stop(t.Context())
121 require.NoError(t, err)
122 assert.Equal(t, 1, inner.start)
123 assert.Equal(t, 1, inner.stop)
124}
125
126func TestCodeModeTool_CallHello(t *testing.T) {
127 t.Parallel()

Callers

nothing calls this directly

Calls 4

WrapFunction · 0.85
ContextMethod · 0.80
StartMethod · 0.65
StopMethod · 0.65

Tested by

no test coverage detected