From ba72587b7b5e639eea63f685a12553c88d9039b4 Mon Sep 17 00:00:00 2001 From: Danny Kopping Date: Fri, 27 Oct 2023 09:35:56 +0200 Subject: [PATCH] Fixing tests Signed-off-by: Danny Kopping --- pkg/logql/metrics_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/logql/metrics_test.go b/pkg/logql/metrics_test.go index 42b88a49a7398..d75abdb8b041d 100644 --- a/pkg/logql/metrics_test.go +++ b/pkg/logql/metrics_test.go @@ -109,9 +109,9 @@ func TestLogLabelsQuery(t *testing.T) { TotalEntriesReturned: 12, }, }) - require.Equal(t, + require.Regexp(t, fmt.Sprintf( - "level=info org_id=foo traceID=%s sampled=true latency=slow query_type=labels length=1h0m0s duration=25.25s status=200 label=foo query= splits=0 throughput=100kB total_bytes=100kB total_entries=12\n", + "level=info org_id=foo traceID=%s sampled=true latency=slow query_type=labels start=.* end=.* start_delta=1h0m0.* end_delta=.* length=1h0m0s duration=25.25s status=200 label=foo query= query_hash=2166136261 total_entries=12\n", sp.Context().(jaeger.SpanContext).SpanID().String(), ), buf.String()) @@ -135,9 +135,9 @@ func TestLogSeriesQuery(t *testing.T) { TotalEntriesReturned: 10, }, }) - require.Equal(t, + require.Regexp(t, fmt.Sprintf( - "level=info org_id=foo traceID=%s sampled=true latency=slow query_type=series length=1h0m0s duration=25.25s status=200 match=\"{container_name=~\\\"prometheus.*\\\", component=\\\"server\\\"}:{app=\\\"loki\\\"}\" splits=0 throughput=100kB total_bytes=100kB total_entries=10\n", + "level=info org_id=foo traceID=%s sampled=true latency=slow query_type=series start=.* end=.* start_delta=1h0m0.* end_delta=.* length=1h0m0s duration=25.25s status=200 match=\"{container_name=.*\"}:{app=.*}\" query_hash=23523089 total_entries=10\n", sp.Context().(jaeger.SpanContext).SpanID().String(), ), buf.String())