-
Notifications
You must be signed in to change notification settings - Fork 22
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
chore: Add BDD test for retrieving documents by versionID #1149
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1149 +/- ##
==========================================
+ Coverage 88.92% 88.99% +0.06%
==========================================
Files 168 168
Lines 16260 16261 +1
==========================================
+ Hits 14460 14472 +12
+ Misses 1112 1103 -9
+ Partials 688 686 -2
Continue to review full report at Codecov.
|
Then check success response contains "thirdKey" | ||
|
||
# start version queries | ||
When client sends request to "https://orb.domain1.com/sidetree/v1/identifiers" to resolve DID document with canonical did and version index 0 |
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.
What does version index mean?
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.
just a way of collecting version ids in BDD test - I will change it as per our conversation
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.
Done
@@ -807,6 +821,22 @@ func (d *DIDOrbSteps) resolveDIDDocumentWithCanonicalDID(url string) error { | |||
return d.resolveDIDDocumentWithID(url, d.canonicalDID) | |||
} | |||
|
|||
func (d *DIDOrbSteps) resolveDIDDocumentWithCanonicalDIDAndVersion(url, version string) error { | |||
logger.Infof("resolving did document with canonical did %s and version %s", d.canonicalDID, version) |
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.
You can do this:
if err := d.state.resolveVarsInExpression(&version); err != nil {
return err
}
didWithParam := d.canonicalDID + "?versionId=" + version
Then check success response contains "canonicalId" | ||
Then the JSON path 'didDocumentMetadata.versionId' of the response is saved to variable "v0" | ||
|
||
When client sends request to "https://orb.domain1.com/sidetree/v1/identifiers" to resolve DID document with canonical did and version "v0" |
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.
Do this instead:
. . . canonical did and version "${v0}"
Update sidetree-core, add BDD test for retrieving documents by versionId. Closes trustbloc#1148 Signed-off-by: Sandra Vrtikapa <sandra.vrtikapa@securekey.com>
Update sidetree-core, add BDD test for retrieving documents by versionId.
Closes #1148
Signed-off-by: Sandra Vrtikapa sandra.vrtikapa@securekey.com