From d2d788c5dc0a9e387635276623c6781774a9dfd4 Mon Sep 17 00:00:00 2001 From: Laurence Jones Date: Tue, 17 Oct 2023 15:29:21 +0100 Subject: [PATCH] [hubtest] escpae scenario asssert meta keys (#2551) --- pkg/hubtest/scenario_assert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/hubtest/scenario_assert.go b/pkg/hubtest/scenario_assert.go index 92b00f64041..f5517c35056 100644 --- a/pkg/hubtest/scenario_assert.go +++ b/pkg/hubtest/scenario_assert.go @@ -205,7 +205,7 @@ func (s *ScenarioAssert) AutoGenScenarioAssert() string { } for evtIndex, evt := range event.Overflow.Alert.Events { for _, meta := range evt.Meta { - ret += fmt.Sprintf(`results[%d].Overflow.Alert.Events[%d].GetMeta("%s") == "%s"`+"\n", eventIndex, evtIndex, meta.Key, meta.Value) + ret += fmt.Sprintf(`results[%d].Overflow.Alert.Events[%d].GetMeta("%s") == "%s"`+"\n", eventIndex, evtIndex, meta.Key, Escape(meta.Value)) } } ret += fmt.Sprintf(`results[%d].Overflow.Alert.GetScenario() == "%s"`+"\n", eventIndex, *event.Overflow.Alert.Scenario)