-
Notifications
You must be signed in to change notification settings - Fork 66
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
API-34449-poa-requests-mock #20353
base: master
Are you sure you want to change the base?
API-34449-poa-requests-mock #20353
Conversation
def use_mocks?(use_mocks) | ||
use_mocks && Settings.claims_api.bgs.mock_responses | ||
end |
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.
why not just use the settings.yml value?
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.
because we can't blanket everything that uses this
@@ -30,7 +30,8 @@ def get_poa_list | |||
|
|||
def poa_list | |||
@poa_list ||= manage_representative_service.read_poa_request(poa_codes: @poa_codes, page_size: @page_size, | |||
page_index: @page_index, filter: @filter) | |||
page_index: @page_index, filter: @filter, | |||
use_mocks: 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.
why hardcode use_mocks per method?
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.
Since local BGS is shared this was the best option I could think of to make sure mocks only happen for the specific requests we want them too.
That being said totally open to a better approach, there is a discussion here
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.
i see - we donʼt want all-or-nothing. i was initially thrown by the 'use_mocks', as if we are telling the call to use mockdata. maybe 'enable_mocks' or 'allow_mocks' could help future maintainers 🤷
Summary
claims_api
namespace for enabling mocking of these BGS callsread_poa_request
which is the BGS call used in the workflow for this ticket specificallyRelated issue(s)
API-34449
Testing done
Testing Notes
API-34449-mock-poa-request-responses
http://localhost:3000/services/claims/v2/veterans/power-of-attorney-requests
(mock)
to make this easy to see)Screenshots
What areas of the site does it impact?
Acceptance criteria
Requested Feedback
(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?