-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat(mirage): implement additional mock route handlers #1092
Conversation
Test image available:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, original bugs are fixed! :)
Signed-off-by: Thuan Vo <thvo@redhat.com>
Test image available:
|
References We use MirageJS to intercept network requests and mock API response: https://miragejs.com/docs/getting-started/introduction/ We also use How its build There is a directory https://webpack.js.org/concepts/entry-points/ How to run/test To run a dev server with mirage, run To build production asset with mirage, run
|
Knowledge hub content :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually there is still some functionality that is broken, notably: ARCHIVE recordings and STOP recordings (both part of a PATCH endpoint). Again because of JSON.parse.
Ahh yess! Missed that in the commits. Added now ^^ |
Tho, rules cannot be created because we need the |
Test image available:
|
Test image available:
|
Ready to review again! Added some missing route handlers to complete the rule functionalities. |
Test image available:
|
Test image available:
|
(cherry picked from commit c185969) # Conflicts: # src/mirage/factories.ts # src/mirage/index.ts
(cherry picked from commit c185969)
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Related to #1039
Description of the change:
api/v2.1/discovery
route handler to ensure Realm group is shown.FormData
(i.e.FormData
object instead ofstring
is returned when accessing body).cryostat.github.io
did this correctly.JSON.parse
that caused the issue.Motivation for the change:
Overall mock API improvement and bug fixes.