-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
|
||
indexServer := auth.GetIndexServer(regURL) | ||
|
||
// NOTE: it will fail when testing against docker.io, as '/v2/_catalog' endpoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make sense to test in the context of OCI. _context
isn't a standard path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I understand from the spec, GET /v2/_catalog
indeed seems to be in the spec.
Do you mean that the listing repo part of the spec needs to be changed?
Or do you mean that the spec is correct, but tests should not take into account that part of the spec, because it's implementation specific?
BTW I see this code has a bug. I'll fix it soon.
dist/dist_test.go
Outdated
|
||
regAuthCtx := auth.NewRegAuthContext() | ||
remoteName := filepath.Join(auth.DefaultRepoPrefix, testImageName) | ||
reqPath := filepath.Join(remoteName, "tags/list") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to also check the /tags/
endpoint. This should have been merged into the spec, but I am not sure on the status of that PR.
cc @dmcgowan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do the change. Thanks.
Added tests for listing existing repos and tags of a given manifest. Signed-off-by: Dongsu Park <[email protected]>
Before checking for /tags/list, we should also check if /tags is available. Signed-off-by: Dongsu Park <[email protected]>
58f9dcf
to
4dba139
Compare
From now on, we should add code to https://github.com/opencontainers/distribution-spec. |
Added tests for listing existing repos and tags of a given manifest.