Add tests for tags list pagination

Signed-off-by: João Pereira <484633+joaodrp@users.noreply.github.com>
This commit is contained in:
João Pereira
2021-05-22 15:15:49 +01:00
parent d80a63f1ea
commit 8ef268df25
3 changed files with 178 additions and 2 deletions

View File

@@ -128,7 +128,7 @@ func (ub *URLBuilder) BuildCatalogURL(values ...url.Values) (string, error) {
}
// BuildTagsURL constructs a url to list the tags in the named repository.
func (ub *URLBuilder) BuildTagsURL(name reference.Named) (string, error) {
func (ub *URLBuilder) BuildTagsURL(name reference.Named, values ...url.Values) (string, error) {
route := ub.cloneRoute(RouteNameTags)
tagsURL, err := route.URL("name", name.Name())
@@ -136,7 +136,7 @@ func (ub *URLBuilder) BuildTagsURL(name reference.Named) (string, error) {
return "", err
}
return tagsURL.String(), nil
return appendValuesURL(tagsURL, values...).String(), nil
}
// BuildManifestURL constructs a url for the manifest identified by name and