MCPcopy
hub / github.com/cloudflare/cloudflared / TestIntoServerEvent_Logs

Function TestIntoServerEvent_Logs

management/events_test.go:122–130  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

120}
121
122func TestIntoServerEvent_Logs(t *testing.T) {
123 event := ServerEvent{
124 Type: Logs,
125 event: []byte(`{"type": "logs"}`),
126 }
127 ce, ok := IntoServerEvent(&event, Logs)
128 require.True(t, ok)
129 require.Equal(t, EventLog{ServerEvent: ServerEvent{Type: Logs}}, *ce)
130}
131
132func TestIntoServerEvent_Invalid(t *testing.T) {
133 event := ServerEvent{

Callers

nothing calls this directly

Calls 2

IntoServerEventFunction · 0.85
EqualMethod · 0.65

Tested by

no test coverage detected