Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/util/marshal/query_test.go

19 lines
389 B

package marshal
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/v3/pkg/logqlmodel"
)
func TestNewStreams(t *testing.T) {
s, err := NewStreams(logqlmodel.Streams{
{
Labels: "{asdf=\"<EFBFBD>\"}",
},
})
require.NoError(t, err)
require.Equal(t, " ", s[0].Labels["asdf"], "expected only a space for label who only contained invalid UTF8 rune")
}