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

restricts registryURL format #76

Merged

Conversation

yangcao77
Copy link
Collaborator

@yangcao77 yangcao77 commented Mar 23, 2021

Signed-off-by: Stephanie yangcao@redhat.com

What does this PR do?

This PR restricts the registryURL format, protocol is expected to be included as part of the registryURL

Since the filed is registryURL, it is expected to follow the url format. library does not need to help resolve the format, and should not take registry host as the url

What issues does this PR fix or reference?

Fixes devfile/api#386

Is your PR tested? Consider putting some instruction how to test your changes

Update unit tests

Verified

This commit was signed with the committer’s verified signature.
greg0ire Grégoire Paris
Signed-off-by: Stephanie <yangcao@redhat.com>
@@ -2983,6 +2983,7 @@ func Test_parseFromRegistry(t *testing.T) {
wantDevFile: parentDevfile,
registryUrl: registry,
registryId: registryId,
wantErr: true,
Copy link
Member

Choose a reason for hiding this comment

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

test title should be should NOT be able to parse from provided registryUrl without prefix

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

Signed-off-by: Stephanie <yangcao@redhat.com>
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maysunfaisal, yangcao77

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [maysunfaisal,yangcao77]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@yangcao77 yangcao77 merged commit dbd2039 into devfile:master Mar 25, 2021
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.

registryURL should a valid URL not just hostname
3 participants