Open baltes opened 3 weeks ago
@baltes So the service that can sub in as PEGA is the Postman call to our endpoint. We can update that call to have whatever payload we want to circumvent PEGA's call to it. Also, it's worth noting that when you submit a form there is no confirmation email. The email only gets sent when the endpoint is hit with a DB row that has an email address.
@balexandr We can put this on the back burner, but the email (or some kind of confirmation) is the point so that we're not wholly dependent on back end engineers for testing. I don't think Postman fills that gap. The need is for a non-engineer to submit a form in a lower environment and see that the downstream features that we own are functioning.
So if we want to add logic to skip the Pega piece altogether we should use a Flipper. We can add something like
skip_pega if Flipper.enabled?(:skip_pega_staging) && !Rails.env.production?
to the UploadController submit
method and then something like:
def skip_pega
params = {
"form_uuid": "582cfa38-262c-43a7-9522-288683f8b96c",
"file_names": "582cfa38-262c-43a7-9522-288683f8b96c_vha_10_10d.pdf",
"status": "Processed",
"case_id": "abc-1234"
}
PegaController.update_status_manual(params)
end
Moving this to the backlog for future consideration since we just stepped into it. This is a future nice to have if we find ourselves needing to test the functionality we own on both sides of an unavailable integration.
As a member of the IVC forms team, I want a service that can sub in for PEGA and pretend to be PEGA so that I can submit forms and see responses as if PEGA were sending status.
We have a bunch of stuff to test, and we can't test it while we're waiting on PEGA. This is not to be used instead of that testing, but to help us learn without being dependent on external factors.
At a minimum, start small with something that will pretend to have loaded all files successfully and report that success. I should have a way of submitting a form seeing a successful callback (not just s3 success) on the datadog dashboard with or without PEGA involved.
This is an effort contained within our team and should not demand any external effort from DOCMP. This is a testing tool for our own use.
Acceptance criteria