Skip to content
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

adding new vectors for testing selectCredentials method #153

Merged
merged 17 commits into from
May 7, 2024

Conversation

jiyoontbd
Copy link
Contributor

@jiyoontbd jiyoontbd commented Apr 26, 2024

Important!

Make sure that if you are updating a test vector that you test in the following repos before merging!

https://github.com/TBD54566975/web5-js - PR here
https://github.com/TBD54566975/web5-kt - PR here
https://github.com/TBD54566975/web5-swift - PR here

Clone each repo locally, make sure that each web5-spec submodule is pointed to your branch, and then run tests to make sure it is still passing in all repos!

@jiyoontbd jiyoontbd changed the title adding a new vector adding new vectors for testing selectCredentials method Apr 30, 2024
]
},
"output": {
"selectedCredentials": []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since all input descriptors must be satisfied, this appears correct (not all are satisfied, no creds selected)

},
"output": {
"selectedCredentials": [
"eyJhbGciOiJFZERTQSIsImtpZCI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJa013VlhrNGN6SnVla1JhTjFsdmRXeFFUM010YjBabFEwWkxaVzAzY1hST1FWVTNiVzB0TjNaaFkxRWlmUSMwIiwidHlwIjoiSldUIn0.eyJpc3MiOiJkaWQ6andrOmV5SnJkSGtpT2lKUFMxQWlMQ0pqY25ZaU9pSkZaREkxTlRFNUlpd2llQ0k2SWtNd1ZYazRjekp1ZWtSYU4xbHZkV3hRVDNNdGIwWmxRMFpMWlcwM2NYUk9RVlUzYlcwdE4zWmhZMUVpZlEiLCJqdGkiOiJ1cm46dmM6dXVpZDo3MjllMTc2ZS1mYjNlLTQyOTktOWI3Yi02MGQzNmVkMzQxNmUiLCJuYmYiOjE3MTQxNjE1NjEsInN1YiI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJa013VlhrNGN6SnVla1JhTjFsdmRXeFFUM010YjBabFEwWkxaVzAzY1hST1FWVTNiVzB0TjNaaFkxRWlmUSIsInZjIjp7IkBjb250ZXh0IjpbImh0dHBzOi8vd3d3LnczLm9yZy8yMDE4L2NyZWRlbnRpYWxzL3YxIl0sInR5cGUiOlsiVmVyaWZpYWJsZUNyZWRlbnRpYWwiLCJTdHJlZXRDcmVkZW50aWFsIl0sImlzc3VlciI6ImRpZDpqd2s6ZXlKcmRIa2lPaUpQUzFBaUxDSmpjbllpT2lKRlpESTFOVEU1SWl3aWVDSTZJa013VlhrNGN6SnVla1JhTjFsdmRXeFFUM010YjBabFEwWkxaVzAzY1hST1FWVTNiVzB0TjNaaFkxRWlmUSIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7ImlkIjoiZGlkOmp3azpleUpyZEhraU9pSlBTMUFpTENKamNuWWlPaUpGWkRJMU5URTVJaXdpZUNJNklrTXdWWGs0Y3pKdWVrUmFOMWx2ZFd4UVQzTXRiMFpsUTBaTFpXMDNjWFJPUVZVM2JXMHROM1poWTFFaWZRIiwibmFtZSI6IlNhdG9zaGkgVGFjb21vdG8ifSwiaWQiOiJ1cm46dmM6dXVpZDo3MjllMTc2ZS1mYjNlLTQyOTktOWI3Yi02MGQzNmVkMzQxNmUiLCJpc3N1YW5jZURhdGUiOiIyMDI0LTA0LTI2VDE5OjU5OjIxWiJ9fQ.MoPYXkSASXEgySIc59HnSN8576cu5q8QC5tCG3PKr3j-glvZNa12j_P563FUVzx7PeFD3QkJne1RYBDOj3OcBw"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this output is also correct since it is the only VC that includes the type StreetCredential at location $.vc.type


### Output

the value of `output` is an object that contains the following properties
the value of `output` is an object that may contain one of the following properties.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this language weakens the requirement. what is testable if the properties are may?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is explaining what's included in the output object in a vector object - some test vector output only includes the presentationSubmission object and some others (like the select-credentials one in this PR) only include selectedCredentials array.

I could say "one of" instead of "may include" to make it a bit more clear.

I don't think this weakens our test requirement as it's just wording around describing the test vector object shapes.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@decentralgabe @jiyoontbd To avoid deciding too much whether "may" is the right word, I pushed a commit adding much more detail to this README that describes shape of each set of vectors separately.

@jiyoontbd jiyoontbd merged commit 4c06416 into main May 7, 2024
1 check passed
@jiyoontbd jiyoontbd deleted the add-pd-select-credential-vector branch May 7, 2024 22:29
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.

4 participants