MCPcopy
hub / github.com/docker/compose / TestHandleHook_InvalidJSON

Function TestHandleHook_InvalidJSON

cmd/compose/hooks_test.go:54–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

52}
53
54func TestHandleHook_InvalidJSON(t *testing.T) {
55 var buf bytes.Buffer
56 err := handleHook(t.Context(), []string{"not json"}, &buf)
57 assert.NilError(t, err)
58 assert.Equal(t, buf.String(), "")
59}
60
61func TestHandleHook_UnknownCommand(t *testing.T) {
62 data := marshalHookData(t, hooks.Request{

Callers

nothing calls this directly

Calls 2

handleHookFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected