-
Notifications
You must be signed in to change notification settings - Fork 213
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
Import rest of tests from kinvolk/ocicert #39
Import rest of tests from kinvolk/ocicert #39
Conversation
Add an UploadLayer test. Run the 3 tests sequentially: UploadLayer, PushManifest, PullManifest. Signed-off-by: Dongsu Park <[email protected]>
Add tests about pulling and deleting layers or manifests, like PullLayer, DeleteLayer, DeleteManifest. Signed-off-by: Dongsu Park <[email protected]>
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]>
8cd2d81
to
6b5c54d
Compare
Rebased. |
@@ -19,4 +19,5 @@ const ( | |||
DistAPIVersionValue string = "registry/2.0" | |||
|
|||
UploadUuidKey string = "Docker-Upload-Uuid" |
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.
These changed recently. Not sure to test against the docker values as well. Perhaps this could be a struct, to then have an array of them to iterate over.
"strconv" | ||
) | ||
|
||
func GenRandomBlob(blobLen int) string { |
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.
Is this actually to get a "blob" or just a simple string?
// Generate a blob's digest, generated as a sha256 checksum of the blob. | ||
// Send a PUT request with a "digest=..." option appended to its URL. | ||
digest := image.GetHash(blob) | ||
putURL := "https://" + indexServer + "/v2/" + reqPath + "/" + uuid + "?digest=" + digest |
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'm wondering if a next step could be to have a golang package much like https://github.com/docker/distribution/blob/master/registry/api/v2/descriptors.go#L237 that clients could import and this test suite could also use to validate against.
bump |
RFC @opencontainers/distribution-spec-maintainers |
@vbatts @dmcgowan @stevvooe any progress on the merge. I am looking to integrate this test framework with Keppel which is a Multi-tenant container image registry. It provides an API which conforms to the OCI Distribution Spec and we would like to use this test framework to test our implementation and make sure that we don't deviate from the spec. Currently the test framework has hardcoded values for
I am more than happy to contribute and get the ball rolling. Kindly let me know if this is something that you want to pursue, and how I can help you in this effort? |
@talal i welcome contributions on this. Your use case is precisely why we want these tests. |
@vbatts Thank you for your response. I'll test this against our API and get back to you. |
Sorry for the late response, I was only able to get back to this task recently. The tests in this branch fail in their current state and they also fail on the Can you do a quick I want to confirm the current state of tests before I proceed. |
LGTM I want these changes to go in, for posterity sake. Even though the current consensus sounds like pulling in the conformance tests from the now-open-sourced projectquay is going to be our approach. |
This PR basically combines 2 original PRs into one: kinvolk-archives/ocicert#2 and kinvolk-archives/ocicert#5
The PR adds more tests such as UploadLayer, PushManifest, PullManifest, PullLayer, DeleteLayer, DeleteManifest.
Review comments were partly addressed. There are still open issues like this.
If there's any comment, please comment to this PR. I can update it.