-
Notifications
You must be signed in to change notification settings - Fork 45
feat: issuance process pending guard #844
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
base: main
Are you sure you want to change the base?
feat: issuance process pending guard #844
Conversation
|
@paullatzelsperger Should I also update |
The anonymous test may be useful. the all-in-one less so, because it tests a different scenario. |
06cc63e to
41258cb
Compare
paullatzelsperger
left a comment
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.
looks good, some minor refactoring is required in the E2E tests
| assertThat(t.getHolderPid()).isEqualTo("test-request-id"); | ||
| })); | ||
|
|
||
| // wait for the issuance process to be pending on the issuer side |
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.
please move the pending guard test into a second test method issuanceFlow_withGuard leaving the original method untouched. Yes, that might duplicate some code, but that second method would only need to assert that the issuance process does not advance automatically and remains in the given state.
| assertThat(t.getHolderPid()).isEqualTo("test-request-id"); | ||
| })); | ||
|
|
||
|
|
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.
see comment in the anonymous holder test
| process.getUpdatedAt(), | ||
| toJson(process.getTraceContext()), | ||
| process.getErrorDetail(), | ||
| process.isPending(), |
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.
this should probably be explicitly asserted in a test as well
41258cb to
def8ffa
Compare
|
|
@thomasrutger our typical work model on PRs is once you've resolved all comments, or post replies to comments, you re-request the review to let the reviewer know you're ready for another round. |
| .header("Location", Matchers.endsWith("/credentials/request/test-request-with-guard-id")); | ||
|
|
||
| // wait for the request status to be requested on the holder side | ||
| await().pollInterval(INTERVAL) |
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.
this assertion is not needed: we are only interesting the issuer-side request to have the pending flag set, i.e the assertion in line #244
| .header("Location", Matchers.endsWith("/credentials/request/test-request-with-guard-id")); | ||
|
|
||
| // wait for the request status to be requested on the holder side | ||
| await().pollInterval(INTERVAL) |
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.
see comment in the anonymous test
| } | ||
|
|
||
| @Test | ||
| void shouldPersistPendingFlag() { |
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.
this tests the update case, and technically the read case, but not the insert case. I would expect one method update_shouldPersistPendingFlag and insert_shouldPersistPendingFlag
b342cb9 to
deff0e6
Compare
deff0e6 to
b780dc9
Compare
|
This pull request is stale because it has been open for 14 days with no activity. |
|
This pull request was closed because it has been inactive for 7 days since being marked as stale. |
What this PR changes/adds
Introduces a pending guard that can stall an issuance process (on the issuer side), until some external condition is met.
Why it does that
In some circumstances it may be desirable to stall issuance until an external process validates the request, such as a manual approval procedure.
Further notes
I noticed that the following block in
DcpIssuanceFlowEndToEndTestchecked for the process to be in theISSUEDstate, not theREQUESTEDstate. I assumed this was incorrect and changed it such that it works with the updated test layout.Who will sponsor this feature?
@paullatzelsperger
Linked Issue(s)
Closes #829