hedera-mirror-node
hedera-mirror-node copied to clipboard
Port REST specs to Java, phase 1
Description: To confidently be able to port over existing JavaScript REST APIs to Java, we need to ensure the existing spec tests continue to work against the newly converted API.
- Add a
RestSpecTestthat- Injects and uses a
RestClientsimilar toControllerTest - Can load JSON spec files from
hedera-mirror-rest-java/src/test/resources/specswith arbitrary depths. For this phase 1 PR, a selected few spec files are choosen. - Model the spec JSON as a
RestSpecPOJO - For each spec, use
DomainBuilderto create default and override with data fromsetupsection and persist - Call the URLs and verify the response JSON and status codes
-
Temporarily add a
hedera-mirror-resttest container to verify all specs pass against it
- Injects and uses a
Related issue(s):
Fixes #6810
Notes for reviewer:
This branch/PR is a step back from the branch 6810-port-rest-specs-to-java which contains additional functionality regarding additional DB entity types for setup. That will be the basis for follow on work to build on this phase 1 PR.
Checklist
- [ ] Documented (Code comments, README, etc.)
- [x] Tested (unit, integration, etc.)