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

Update Test Suite #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jeremylong
Copy link

  1. Correct versions that included a purl with an un-encoded colon in the version (test-suite-data.json:88).

    Per purl-spec#character-encoding

    the '#', '?', '@' and ':' characters must NOT be encoded when used as separators. They may need to be encoded elsewhere

  2. Corrected copy paste issue in description of check for /// (test-suite-data.json:255).

  3. Added test for un-necessary trailing slash (test-suite-data.json:267).

  4. Added a bintray example to test namespaces with multiple segments (test-suite-data.json:279).

  5. Added test case to check for invalid '..' segments in the subpath (test-suite-data.json:327).

  6. Added test case to check for invalid '.' segments in the subpath (test-suite-data.json:339).

"purl": "pkg:docker/customer/dockerimage@sha256:244fd47e07d1004f0aed9c?repository_url=gcr.io",
"canonical_purl": "pkg:docker/customer/dockerimage@sha256:244fd47e07d1004f0aed9c?repository_url=gcr.io",
"purl": "pkg:docker/customer/dockerimage@sha256%3A244fd47e07d1004f0aed9c?repository_url=gcr.io",
"canonical_purl": "pkg:docker/customer/dockerimage@sha256%3A244fd47e07d1004f0aed9c?repository_url=gcr.io",
Copy link
Member

Choose a reason for hiding this comment

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

This hasn't been clarified yet and is a subject of discussion in #39 which needs to be clarified before merge.

@@ -252,7 +252,7 @@
"is_invalid": false
},
{
"description": "slash /// after type is not significant",
"description": "slash /// after scheme is not significant",
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the correction. This is a carryover from a time before PackageURLs began with pkg:/

@@ -263,6 +263,30 @@
"subpath": null,
"is_invalid": false
},
{
"description": "slash / between version and qualifiers separator is not significant",
"purl": "pkg:maven/org.apache.commons/io@2.6/?scope=test",
Copy link
Member

Choose a reason for hiding this comment

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

The spec states that leading and trailing / is not significant on namespace and subpath only. This may be an invalid test case. Need clarification @pombredanne

Copy link
Author

Choose a reason for hiding this comment

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

This was added as part of code coverage in the java implementation. If this is invalid - then the How to parse may contain unnecessary steps. The step after Split the remainder once from left on ':' is Strip the remainder from leading and trailing '/'. Trying to figure out what other type of URL would end up with a trailing '/' at this point in parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants