open-traffic-generator / snappi

Open Traffic Generator SDK in Python and Go
MIT License
69 stars 7 forks source link

GoSnappi HTTP: Deep comparison of gosnappi constructs fail even though content/type of compare-inputs are same #145

Open rudranil-das opened 2 years ago

rudranil-das commented 2 years ago

This issue is identified while integrating with Gosnappi HTTP Server implementation. https://github.com/open-traffic-generator/snappi/tree/gosnappi_server_tmp/gosnappi

If we want to deep compare instances of same objects [e.g. comparing Metrics() of 2 flows with identical content],

reflect.DeepEqual(f1.Metrics().Msg(), f2.Metrics().Msg())

the comparison fails.

Although, just before the comparison, if we just add the following lines, comparison succeeds,

f1.Metrics().ToJson()
f2.Metrics().ToJson()

which leads to a thought that,