From c778d5283f8d03b52c373c51fda0026bed2ad239 Mon Sep 17 00:00:00 2001 From: Christian Haudum Date: Tue, 9 Jul 2024 17:17:29 +0200 Subject: [PATCH] fixup! Fix engine test by using query hash instead of serialized params Signed-off-by: Christian Haudum --- pkg/logql/engine_test.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkg/logql/engine_test.go b/pkg/logql/engine_test.go index b6edf09bdeac8..b409422c1c8fc 100644 --- a/pkg/logql/engine_test.go +++ b/pkg/logql/engine_test.go @@ -2738,14 +2738,12 @@ func paramsID(p interface{}) string { case SelectLogParams: case SelectSampleParams: return fmt.Sprintf("%d", params.Plan.Hash()) - default: - b, err := json.Marshal(p) - if err != nil { - panic(err) - } - return strings.ReplaceAll(string(b), " ", "") } - panic("invalid params type") + b, err := json.Marshal(p) + if err != nil { + panic(err) + } + return strings.ReplaceAll(string(b), " ", "") } type logData struct {