-
Notifications
You must be signed in to change notification settings - Fork 43
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
Adds ability to serve mocked data for MR API calls via cli flag #377
Conversation
Signed-off-by: Alex Creasy <[email protected]>
3c750ab
to
b3ef316
Compare
```shell | ||
make run PORT=8000 MOCK_K8S_CLIENT=true | ||
make run PORT=8000 MOCK_K8S_CLIENT=true MOCK_MR_CLIENT=true |
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.
Not a review, it's more of a question, are we gonna get 8000 as the default port? We have 4000 in the frontend for the api, if so, I'll do a follow up PR to change the references there.
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.
You are right, the default port seems to be PORT ?= 4000 (on Makefile)
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.
But on those instructions, I just to show how to do with an alternative one.
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.
Yes... if you leave out the PORT param it defaults to 4000 - I think this is just a doc issue of "how to I make that clearer"
```shell | ||
make run PORT=8000 MOCK_K8S_CLIENT=true | ||
make run PORT=8000 MOCK_K8S_CLIENT=true MOCK_MR_CLIENT=true |
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.
You are right, the default port seems to be PORT ?= 4000 (on Makefile)
```shell | ||
make run PORT=8000 MOCK_K8S_CLIENT=true | ||
make run PORT=8000 MOCK_K8S_CLIENT=true MOCK_MR_CLIENT=true |
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.
But on those instructions, I just to show how to do with an alternative one.
@@ -11,6 +11,8 @@ import ( | |||
|
|||
type Envelope map[string]interface{} | |||
|
|||
type TypedEnvelope[T any] map[string]T |
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.
@alexcreasy in a next iteration shall we remove the untyped one?
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.
@ederign yes, I'd like to, the only reason I didn't just change it was for speed right now :)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ederign The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Description
This adds scaffolding to be able to serve mocked data for MR API endpoints. It also incudes endpoints to mock all existing BFF endpoints and their tests. The remaining endpoints will be added shortly after in a separate PR
How Has This Been Tested?
MOCK_MR_API=true
flag (See README updates for more info)Merge criteria:
DCO
check)If you have UI changes