MCPcopy Index your code
hub / github.com/cli/cli / TestRunSendTelemetryInvalidPayload

Function TestRunSendTelemetryInvalidPayload

pkg/cmd/send-telemetry/send_telemetry_test.go:200–206  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

198}
199
200func TestRunSendTelemetryInvalidPayload(t *testing.T) {
201 err := runSendTelemetry(context.Background(), &SendTelemetryOptions{
202 TelemetryEndpointURL: "http://localhost:0",
203 PayloadJSON: "not-json",
204 })
205 require.Error(t, err)
206}
207
208func TestRunSendTelemetryServerError(t *testing.T) {
209 mock := &mockTelemetryAPI{err: assert.AnError}

Callers

nothing calls this directly

Calls 2

runSendTelemetryFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected