This repository has been archived by the owner on Aug 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Breakup main tasks into mockable subroutines, support "v1" or "v2" schema per https://github.com/cisagov/pen-test-portal/pull/3 #51
Closed
+1,104
−133
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…confusing (since it does not skip a record!)
… to stand up to some basic bad input.
…ally get pulled in from our exemplar file.
…e handled appropriately.
… it does not have a RVA ID field
…begin work on mocked db calls
#49 covers the earlier verison of this. The only really important comment out of there is:
"id": "RVA ID" |
@Yablargo Apologies for the complication but you will need to rebuild this pull request because of the merge of #50. |
No worries, looking at the deltas I think I can just remove the (now unnecessary) workflow changes |
10 tasks
Continued at #55 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🗣 Description
To address #15, some of the major actions of the task are broken up into subtasks, and try to give a descriptive outer exception on what went wrong, while passing a trace and inner exception to preserve the "actual" error.
Additionally, this now supports "v1" and "v2" schemas as described @ https://github.com/cisagov/pen-test-portal/pull/3
💭 Motivation and context
I think this helps with readability and testability, since unit tests can now mock up e.g. the s3 test or test them against ephemeral services to make sure things are working correctly.
This is going to be necessary to adapt the changes from the pen-test-portal project as currently testing this task outside of it's native environment is difficult.
🧪 Testing
The new validation and update functions have test coverage now where none existed before.
Mocked database calls are checked to see if the main logic is correctly updating the back end database.
✅ Pre-approval checklist
in code comments.
to reflect the changes in this PR.
✅ Pre-merge checklist
✅ Post-merge checklist