[hubtest] escpae scenario asssert meta keys (#2551)

This commit is contained in:
Laurence Jones 2023-10-17 15:29:21 +01:00 committed by GitHub
parent a4dc5053d2
commit d2d788c5dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)