MCPcopy
hub / github.com/grafana/tempo / TestDoSearchError

Function TestDoSearchError

cmd/tempo-vulture/main_test.go:579–596  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

577}
578
579func TestDoSearchError(t *testing.T) {
580 seed := time.Date(2008, 1, 1, 12, 0, 0, 0, time.UTC)
581 traceInfo := util.NewTraceInfo(seed, "test")
582
583 // Define the configuration
584 config := vultureConfiguration{
585 tempoOrgID: "orgID",
586 tempoWriteBackoffDuration: time.Second,
587 }
588
589 logger = zap.NewNop()
590
591 // Assert an errored search
592 mockHTTPClient := MockHTTPClient{err: errors.New("an error")}
593
594 doSearch(&mockHTTPClient, config, traceInfo, logger)
595 assert.Equal(t, 0, mockHTTPClient.GetSearchesCount())
596}
597
598func TestGetGrpcEndpoint(t *testing.T) {
599 _, err := getGRPCEndpoint("http://%gh&%ij")

Callers

nothing calls this directly

Calls 4

GetSearchesCountMethod · 0.95
NewTraceInfoFunction · 0.92
doSearchFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected