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

Add reusable test vectors #130

Merged
merged 7 commits into from
Apr 3, 2024
Merged

Add reusable test vectors #130

merged 7 commits into from
Apr 3, 2024

Conversation

KendallWeihe
Copy link
Contributor

I've also added one example usage for decoding VC JWT, and had to fix something within the decode function

I originally wrote a test vector for did:jwk resolve but it was failing because we need to finish the work:

Will follow up with subsequent PRs for full coverage

web5-spec-test-vectors.go Outdated Show resolved Hide resolved
web5-spec-test-vectors.go Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

he done it! he used the dashes! the thing everyone wants to do but shys away bc presumed go convention. thoughts on just testvectors.go? are you thinking we may end up adding moar vector loaders? if so, adding web5-spec def makes sense as prefix. alternatively, could use this file for loading all sorts of vectors and change the function name to LoadWeb5SpecVectors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oop, been in rust hacking land so forgetting golang conventions, change the filename!

thought about making the function specific to web5, but that data structure may be a standard or reusable across different vector sets, so leaving as-is for now

a bit annoying we have the relative file path in the test file but I can't think of an obvious better alternative

Copy link
Contributor

@mistermoe mistermoe left a comment

Choose a reason for hiding this comment

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

awesome stuff @KendallWeihe . really like the idea of a reusable vector loader

@KendallWeihe KendallWeihe merged commit 05b8b39 into main Apr 3, 2024
5 checks passed
@KendallWeihe KendallWeihe deleted the kendall/test-vectors branch April 3, 2024 14:11
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.

2 participants