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

Extra test vectors #47

Closed
wants to merge 6 commits into from
Closed

Extra test vectors #47

wants to merge 6 commits into from

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Mar 12, 2022

Now for some hard ones...

This introduces two things on the mechanism side:

  • Test descriptions. Thanks to JSON for not having comments.
  • Tests whose uri and uri-from-cri is null. This is on precisely the tests where the reference can not be expressed as a URI. Resolved URIs are still present, because all CRIs are also URIs (just the CRI references are more expressive). Implementations may skip the URI conversion on the references, or attempt to convert the CRI to a URI and require the conversion to fail.
  • Tests with an "invalid" entry are, in some form, invalid CRIs. Implementations may skip them, or just silence errors but not crashes, or (if they check thoroughly) even require errors to be raised.

That being said, these tests are what I needed to get OKish coverage, and to flush out places where I knew my implementation was incomplete. It contains PETs and non-PET things that do or do not need escaping in a lot of places, plus tests for things that will get separate issues shortly (like the last one)

chrysn added 2 commits March 12, 2022 14:06
This splits the example into what the URI said (there is a query
parameter) and what the CRI said (there is a question mark in the path).
@chrysn
Copy link
Member Author

chrysn commented Jun 16, 2022

Is there any discussion necessary on whether these changes are correct, or can we just merge this?

@chrysn
Copy link
Member Author

chrysn commented Jun 20, 2022

I've updated my Rust implementation (some cleanup needed before pushing), and it passes with these vectors and I found no new issues from making it work.

@chrysn
Copy link
Member Author

chrysn commented Jun 21, 2022

One more commit now adds a test for PET in the host name; I found that necessary for feature coverage in the Rust implementation (but they pass in the Python impl as well).

tests/tests.json Outdated Show resolved Hide resolved
chrysn added 2 commits June 22, 2022 13:56
The empty array is clearly described to mean discard-nothing. A separate
test case that duplicated the previously existing explicit `[0]` case is
removed. (So that there are now "only" 2 CRIs equivalent to the URI <>).
@chrysn
Copy link
Member Author

chrysn commented Jun 24, 2022

Takeaway from today's meeting: "invalid" should be classified (without ruling out that weird cases stay weird until our mental model of how things can be wrong in a CRI has been enhanced)

@chrysn
Copy link
Member Author

chrysn commented May 5, 2024

Now part of #79 except for #86 -- closing.

@chrysn chrysn closed this May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants