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

Function TestSelectErrors

pkg/traceql/parse_test.go:530–546  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

528}
529
530func TestSelectErrors(t *testing.T) {
531 tests := []struct {
532 in string
533 err error
534 }{
535 {in: "select(.a) && { .b }", err: newParseError("syntax error: unexpected &&, expecting with", 0, 12)},
536 {in: "select()", err: newParseError("syntax error: unexpected )", 1, 8)},
537 }
538
539 for _, tc := range tests {
540 t.Run(tc.in, func(t *testing.T) {
541 _, err := Parse(tc.in)
542
543 require.Equal(t, tc.err, err)
544 })
545 }
546}
547
548func TestSelectOperation(t *testing.T) {
549 tests := []struct {

Callers

nothing calls this directly

Calls 4

newParseErrorFunction · 0.85
ParseFunction · 0.85
RunMethod · 0.45
EqualMethod · 0.45

Tested by

no test coverage detected