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

test: snapshot testing for new rpcs #4792

Closed
wants to merge 1 commit into from

Conversation

msgmaxim
Copy link
Contributor

Pull Request

Closes: PRO-1336

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have updated documentation where appropriate.

Summary

Added snapshot tests for the boost RPCs.

I also used assert_json_snapshot, which seems to work better than assert_snapshot with converting to JSON manually used for other RPCs (it also pretty-prints, which means on conflict you will see its precise location because serialization is no longer a single line).

Note that this is on top of the other open PR (if both are approved at the same time, it might be easier to merge this one first).

@msgmaxim msgmaxim requested a review from kylezs April 23, 2024 02:01
"asset": "FLIP"
},
"tier": 10,
"available_amount": 1000000000000000000000000000000000000
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we not serialize amounts using hex? ( @GabrielBuragev ?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, was thinking about that too as I was writing this test. Don't think JS will be able to read this number accurately. I thought if the PRs are merged quickly, I'd make the change in a separate PR (since the PR for the other RPC method is already merged anyway), but since there are some other comments to address anyway, I will update it to use the hex amounts too.

@msgmaxim msgmaxim mentioned this pull request Apr 25, 2024
2 tasks
@msgmaxim
Copy link
Contributor Author

Closing this as now I've added these tests directly in #4780

@msgmaxim msgmaxim closed this Apr 25, 2024
@kylezs kylezs deleted the test/boost-rpc-snapshot branch April 25, 2024 14:46
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

Successfully merging this pull request may close these issues.

2 participants