Project

Profile

Help

Maintenance: Planio will be observing a scheduled maintenance window this Tuesday, November 5, 2024 from 03:00 UTC until 06:30 UTC to perform urgent network maintenance in our primary data center. Your Planio account will be unavailable during this maintenance window.

Issue #5830

closed

test_pull_image_with_real_docker_client fails due to lack of "sha256" in compared string

Added by mdepaulo@redhat.com almost 5 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 63
Quarter:

Description

Test env:

  1. Fedora 31
  2. Podman 1.6.2
  3. pulp_container 1.0 branch from about 1 week ago
  4. pulpcore 1.0 branch from about 1 week ago
pulp_container/tests/functional/api/test_token_authentication.py::TokenAuthenticationTestCase::test_pull_image_with_real_docker_client FAILED                                                                                                          [100%]

========================================================================================================================== FAILURES ==========================================================================================================================
____________________________________________________________________________________________ TokenAuthenticationTestCase.test_pull_image_with_real_docker_client _____________________________________________________________________________________________

self = <pulp_container.tests.functional.api.test_token_authentication.TokenAuthenticationTestCase testMethod=test_pull_image_with_real_docker_client>

    def test_pull_image_with_real_docker_client(self):
        """
        Test if a CLI client is able to pull an image from an authenticated registry.

        This test checks if ordinary clients, like docker, or podman, are able to pull the
        image from a secured registry.
        """
        registry = cli.RegistryClient(self.cfg)
        registry.raise_if_unsupported(unittest.SkipTest, 'Test requires podman/docker')

        image_url = urljoin(
            self.cfg.get_content_host_base_url(),
            self.distribution['base_path']
        )
        image_with_tag = f'{image_url}:manifest_a'
        registry.pull(image_with_tag)

        image = registry.inspect(image_with_tag)
>       self.compare_config_blob_digests(image[0]['Id'])

pulp_container/tests/functional/api/test_token_authentication.py:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
pulp_container/tests/functional/api/test_token_authentication.py:135: in compare_config_blob_digests
    self.assertEqual(pulled_manifest_digest, config_blob_response['digest'])
E   AssertionError: 'd21d863f69b5de1a973a41344488f2ec89a625f2624195f51b4e2d54a97fc53b' != 'sha256:d21d863f69b5de1a973a41344488f2ec89a625f2624195f51b4e2d54a97fc53b'
E   - d21d863f69b5de1a973a41344488f2ec89a625f2624195f51b4e2d54a97fc53b
E   + sha256:d21d863f69b5de1a973a41344488f2ec89a625f2624195f51b4e2d54a97fc53b
E   ? +++++++
====================================================================================================================== warnings summary ======================================================================================================================
pulp_container/tests/functional/api/test_tagging_images.py::TaggingTestCase::test_02_tag_first_image_with_same_tag
  /home/fedora/devel/pulp_container/pulp_container/tests/functional/api/test_tagging_images.py:87: DeprecationWarning: Please use assertEqual instead.
    self.assertEquals(latest_version_before, latest_version_after)

pulp_container/tests/functional/api/test_token_authentication.py::TokenAuthenticationTestCase::test_pull_image_with_raw_http_requests
  /usr/local/lib/pulp/lib64/python3.7/site-packages/pulp_smash/api.py:642: RuntimeWarning: This client should be used to communicate with localhost, but a request is being made to ip-172-31-14-241.eu-central-1.compute.internal. The request will be made, but beware that information intended for localhost (such as authentication tokens) may now be sent to ip-172-31-14-241.eu-central-1.compute.internal. Here's the list of options being sent with this request: {'verify': False, 'auth': ('admin', 'password'), 'url': 'http://ip-172-31-14-241.eu-central-1.compute.internal/token', 'params': {'service': 'http://ip-172-31-14-241.eu-central-1.compute.internal', 'scope': 'repository:7ef0709a-78b5-4f1a-bb42-c67ebdfad55f:pull'}}
    RuntimeWarning,

-- Docs: https://docs.pytest.org/en/latest/warnings.html

Also available in: Atom PDF