-
Notifications
You must be signed in to change notification settings - Fork 395
docker: export functions and variables for a distribution-spec cert tests #527
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
docker: export functions and variables for a distribution-spec cert tests #527
Conversation
c5a57f4 to
75e5925
Compare
|
makes sense to me, where we could learn more about the certification of distribution-spec? |
Export the following functions and variables to be used by tests for certification of the distribution-spec. * DockerReference * MakeRequest * NewDockerClientFromRef * SendAuth, V2Auth, NoAuth * TagOrDigest Signed-off-by: Dongsu Park <[email protected]>
75e5925 to
2b37a88
Compare
|
@runcom Recent discussions: opencontainers/distribution-spec#24 |
|
alright, it does makes sense to me. I just want to avoid exposing the low level of the docker client we use. Otherwise it's like using any other http client like curl. In case of docker/distribution, how are you dealing with that since they don't expose a raw client like us? |
|
@runcom Ok, I see.
Though some functions and variables like |
|
Thanks for the PR. I am a bit unclear on what exactly the tests are supposed to verify, and depending on that the desired API changes significantly; and the linked discussion does not really say.
If you want to test interoperability with c/image, that is very welcome, but just use the public API as it would be called in practice, please. (It is quite reasonable to contemplate that the API should be extended in some way, e.g. to make error values easier to semantically process in callers so that they can, just for illustration, reliably distinguish e.g. a missing image from a network timeout error. Quite likely that could be useful for the test suite as well. But this would not go as far as exposing the whole HTTP communication so that a HTTP-level test suite could verify handling of corner cases, because real-world callers would not need that, and again, any error handling code would include workarounds for interoperability; a particular known pain point is that different registries report “image not found” in somewhat inconsistent ways, and c/image would probably prefer to report all of them as a single kind of Go error value so that the callers don’t have to care.) Or, maybe — it somewhat looks as if what you really wanted was raw HTTP-level access for testing the behavior, but you’d like containers/image to handle authentication for you, so that each individual test can focus on its specific part of the API — and that you don’t care for the whole |
… and while I can clearly see how that could allow code reuse, it would not quite be at the level of “using containers/image to test the registry”, because it would be using only a very small part of it. Or, maybe (wildly speculating here), Overall, though, opencontainers/distribution-spec#24 really needs to decide whether they want to test whether real-world interoperability with c/image, or strict spec conformance (or, sure, both independently). |
|
What I want to do is definitely the 2nd one,
Hmm, I thought that the
That's not exactly what I wanted to do. But that sounds like an option. If you say that's better, then I can do so.
That sounds like a good idea. I'm going to write a comment in opencontainers/distribution-spec#24 as well. |
Hum, that may not be quite what you want either, because Lines 416 to 423 in 4b6d9cf
So…
… Sure, in this case there is a big comment, but your WIP work, as well as the It can definitely be done but it will require extremely careful line-by-line review of the code vs. the spec. |
|
please all take a look at my concerns here as well opencontainers/distribution-spec#24 (comment) |
Hmm, Interesting. The scope provided by client is used.
Thanks. Let me think. |
|
@dongsupark Needs a rebase. Is this still something you are working on? |
|
No, I'm not working on it any more. I came up with a pure HTTP-based approach. |
Export the following functions and variables to be used by tests for certification of the distribution-spec.
Does it make sense? If not, please let me know.
See also my work-in-progress pull request: kinvolk-archives/ocicert#1