camallo / dkregistry-rs

A pure-Rust asynchronous library for Docker Registry API v2
Apache License 2.0
62 stars 39 forks source link

fix: correctly separate multiple scopes with '&' #177

Closed edwardgeorge closed 4 years ago

edwardgeorge commented 4 years ago

was generating invalid query strings with multiple scopes, eg:

.authenticate(&["repository:foo:pull", "repository:bar:pull"])

is serialised as:

?service=...&scope=repository:foo:pullscope=repository:bar:pull

note the missing '&' between pull and scope.

lucab commented 4 years ago

@edwardgeorge good catch! If you don't mind, can you please add unit tests for the following three cases:

edwardgeorge commented 4 years ago

@lucab sure, no problem.

edwardgeorge commented 4 years ago

@lucab updated with three tests

edwardgeorge commented 4 years ago

@steveeJ updated with consolidated, parametrized tests