-
Notifications
You must be signed in to change notification settings - Fork 544
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
implement listTags tests #918
Conversation
4c42fe7
to
69dcf19
Compare
countTags := 0 | ||
for tag := range c { | ||
if countTags >= n { | ||
break |
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.
I'd be satisfied with just a TODO here that we need to include the Link
header for the next page, but you could also just implement it, if you'd like!
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.
@jonjohnsonjr thanks for the feedback, i will implement that
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.
I tried to run the list tags against docker API and I think I'm doing something wrong because when I set the n
to be something like 5 or 100 it returns the same as not setting the n
TOKEN=$(curl -s "https://auth.docker.io/token?scope=repository%3Alibrary%2Fgolang%3Apull&service=registry.docker.io" | jq -r .token)
curl -v -s -H "Authorization: Bearer ${TOKEN}" "https://index.docker.io/v2/library/golang/tags/list?n=5"
am I doing something very wrong?
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.
tried in gcr as well same results :/
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.
am I doing something very wrong?
Nope! It's just that neither docker hub nor GCR implement this (for different reasons).
Looking for a random public image on the internet, it seems that quay.io does implement this:
$ curl -v https://quay.io/v2/kubernetes_incubator/nfs-provisioner/tags/list?n=5
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.
@jonjohnsonjr I added a TODO, because I'm afraid I cannot implement this due to lack of time and would not have this PR hanging around for a long time.
When I have more time I will come back if this was not implemented by another person.
PTAL
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.
Sounds good, thanks!
Codecov Report
@@ Coverage Diff @@
## master #918 +/- ##
==========================================
+ Coverage 72.77% 72.90% +0.12%
==========================================
Files 108 108
Lines 4713 4757 +44
==========================================
+ Hits 3430 3468 +38
- Misses 773 778 +5
- Partials 510 511 +1
Continue to review full report at Codecov.
|
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
69dcf19
to
e0f75b4
Compare
countTags := 0 | ||
for tag := range c { | ||
if countTags >= n { | ||
break |
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.
Sounds good, thanks!
as a continuation of in intention of the work here: #915
This PR implements the
ListTags
testsAll feedback are welcome
/assign @jonjohnsonjr