Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
rudranil-das opened this issue Dec 3, 2021 · 0 comments
Assignees

Comments

@rudranil-das
Copy link
Contributor

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,

  • certain objects/constructs (although, none found visually during debugging) are not set to defaults.
  • ToJson() is enabling the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants