Project

Profile

Help

Test #5554

closed

A test scenario for syncing repositories with whitelisted tags

Added by lmjachky about 5 years ago. Updated over 4 years ago.

Status:
CLOSED - COMPLETE
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Platform Release:
Tags:
Sprint:
Quarter:

Description

The PR https://github.com/pulp/pulp_docker/pull/429/files introduces new changes to the model and the representation of the field whitelist_tags.

The following test scenario to test the changes is proposed:
1. Create a new repository:

http POST http://localhost:24817/pulp/api/v3/repositories/ name=foo

2. Create a new docker remote with a sample set of whitelisted tags:

http POST http://localhost:24817/pulp/api/v3/remotes/docker/docker/ name='library/busybox' upstream_name='busybox' url='https://registry-1.docker.io'  policy='on_demand' whitelist_tags:="[\"latest\", \"1.31\"]"

3. Execute a sync and check if only whitelisted tags were correctly synced. In addition, check if whitelisted tags were correctly serialized as a list.

http :24817/pulp/api/v3/content/docker/tags/?repository_version_added=/pulp/api/v3/repositories/f2cdfe03-ad46-4760-875b-9b5228edc684/versions/1/
{
    "count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "_created": "2019-10-08T13:20:55.325935Z",
            "_href": "/pulp/api/v3/content/docker/tags/6fc08249-5994-47ee-9cbb-392332e22a14/",
            "_type": "docker.tag",
            "artifact": "/pulp/api/v3/artifacts/b581ddbe-e8d0-4d05-bb2b-9afb39572451/",
            "name": "1.31",
            "tagged_manifest": "/pulp/api/v3/content/docker/manifests/325b8e2b-b665-4185-8bbb-74ed7691378a/"
        },
        {
            "_created": "2019-10-08T13:20:55.317976Z",
            "_href": "/pulp/api/v3/content/docker/tags/cebc99db-bd92-4327-a79c-dbbde38098f9/",
            "_type": "docker.tag",
            "artifact": "/pulp/api/v3/artifacts/b581ddbe-e8d0-4d05-bb2b-9afb39572451/",
            "name": "latest",
            "tagged_manifest": "/pulp/api/v3/content/docker/manifests/325b8e2b-b665-4185-8bbb-74ed7691378a/"
        }
    ]
}
http :24817/pulp/api/v3/remotes/docker/docker/9db3bb5d-3288-474a-b8b8-180784d6a8fa/
{
    "_created": "2019-10-08T13:20:50.593489Z",
    "_href": "/pulp/api/v3/remotes/docker/docker/9db3bb5d-3288-474a-b8b8-180784d6a8fa/",
    "_last_updated": "2019-10-08T13:20:50.593502Z",
    "_type": "docker.docker",
    "download_concurrency": 20,
    "name": "library/busybox",
    "policy": "on_demand",
    "proxy_url": null,
    "ssl_ca_certificate": null,
    "ssl_client_certificate": null,
    "ssl_client_key": null,
    "ssl_validation": true,
    "upstream_name": "busybox",
    "url": "https://registry-1.docker.io",
    "whitelist_tags": [
        "latest",
        "1.31"
    ]
}
Actions #1

Updated by ipanova@redhat.com about 5 years ago

  • Project changed from Docker Support to Container Support
Actions #2

Updated by lmjachky over 4 years ago

  • Status changed from NEW to CLOSED - COMPLETE

Also available in: Atom PDF