Skip to content

Conversation

@mrotondo
Copy link
Contributor

Link to pivotal/JIRA issue

https://codeforamerica.atlassian.net/browse/TBE-277

Is PM acceptance required? (delete one)

  • No - merge after code review approval

Reminder: merge main into this branch and get green tests before merging to main

What was done?

  • We initially tested this API with a combination of postman and irb invocations. That felt hard to share with the team & less documentable, so I made a script that can both grab an access token and hit the test endpoint, as long as you have the key id (from our jwk), the private key we used to generate the public key in the jwk, and the client ID (from the IRS ESAM site) for a state. Most people don't have this, but at least this way we can all see the code and if we securely share those values, they can run the code too.
  • I additionally extracted decryption of IRS API responses into a class method on IrsApiService, since it's relatively complex and I didn't want to duplicate it. I tested that IrsApiService.import_federal_data is still able to decrypt API responses manually by generating an auth code on the ATS site, passing it import_federal_data and observed that the response was still decrypted successfully.

How to test?

  • I didn't add tests for the script, and IrsApiService doesn't have any tests but I tested it manually.

@github-actions
Copy link

Heroku app: https://gyr-review-app-6049-f3573bb07d9c.herokuapp.com/
View logs: heroku logs --app gyr-review-app-6049 (optionally add --tail)

@mrotondo mrotondo merged commit e75b557 into main Oct 27, 2025
8 checks passed
@mrotondo mrotondo deleted the TBE-277-test-direct-file-state-api-v-2 branch October 27, 2025 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants