Skip to content
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

4.2.0 release #2506

Merged
merged 9 commits into from Feb 6, 2020
Merged

4.2.0 release #2506

merged 9 commits into from Feb 6, 2020

Conversation

ulyssessouza
Copy link
Collaborator

@ulyssessouza ulyssessouza commented Feb 6, 2020

Resolves #2505

riedel and others added 9 commits February 6, 2020 10:33
Signed-off-by: Till Riedel <riedel@teco.edu>
Signed-off-by: Till Riedel <riedel@teco.edu>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
Signed-off-by: Renlong Tu <rentu@microsoft.com>
Signed-off-by: Christopher Crone <christopher.crone@docker.com>
The ImageCollectionTest.test_pull_multiple test performs a `docker pull` without
a `:tag` specified) to pull all tags of the given repository (image).

After pulling the image, the image(s) pulled are checked to verify if the list
of images contains the `:latest` tag.

However, the test assumes that all tags of the image are tags for the same
version of the image (same digest), and thus a *single* image is returned, which
is not always the case.

Currently, the `hello-world:latest` and `hello-world:linux` tags point to a
different digest, therefore the `client.images.pull()` returns multiple images:
one image for digest, making the test fail:

    =================================== FAILURES ===================================
    ____________________ ImageCollectionTest.test_pull_multiple ____________________
    tests/integration/models_images_test.py:90: in test_pull_multiple
        assert len(images) == 1
    E   AssertionError: assert 2 == 1
    E    +  where 2 = len([<Image: 'hello-world:linux'>, <Image: 'hello-world:latest'>])

This patch updates the test to not assume a single image is returned, and instead
loop through the list of images and check if any of the images contains the
`:latest` tag.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Anca Iordache <anca.iordache@docker.com>
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
@ulyssessouza ulyssessouza merged commit 1d1532f into docker:release Feb 6, 2020
ulyssessouza added a commit to ulyssessouza/docker-py that referenced this pull request Feb 7, 2020
4.2.0 release

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants