Project

Profile

Help

Issue #5830

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

Added by mdepaulo@redhat.com 8 months ago. Updated 7 months 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

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

Associated revisions

Revision 3114faa8 View on GitHub
Added by Lubos Mjachky 8 months ago

Prepend 'sha256' to an image Id if not already present

closes #5830 https://pulp.plan.io/issues/5830

Revision 3114faa8 View on GitHub
Added by Lubos Mjachky 8 months ago

Prepend 'sha256' to an image Id if not already present

closes #5830 https://pulp.plan.io/issues/5830

Revision d61979ab View on GitHub
Added by Lubos Mjachky 8 months ago

Prepend 'sha256' to an image Id if not already present

closes #5830 https://pulp.plan.io/issues/5830

(cherry picked from commit 3114faa846def77864bd79bd5b4a7c77e2cb74ea)

Revision d61979ab View on GitHub
Added by Lubos Mjachky 8 months ago

Prepend 'sha256' to an image Id if not already present

closes #5830 https://pulp.plan.io/issues/5830

(cherry picked from commit 3114faa846def77864bd79bd5b4a7c77e2cb74ea)

History

#1 Updated by ipanova@redhat.com 8 months ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 62

#2 Updated by ipanova@redhat.com 8 months ago

  • Project changed from Docker Support to Container Support

#3 Updated by rchan 8 months ago

  • Sprint changed from Sprint 62 to Sprint 63

#4 Updated by lmjachky 8 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to lmjachky

#5 Updated by lmjachky 8 months ago

  • Status changed from ASSIGNED to POST

#6 Updated by ipanova@redhat.com 8 months ago

  • Status changed from POST to MODIFIED

#7 Updated by zaidavargas 8 months ago

Thanks for this. This will help me to solve error from https://onsumo.com/happy-birthday-memes/

#8 Updated by Anonymous 8 months ago

#9 Updated by fao89 8 months ago

  • Tags CI/CD added

#10 Updated by fao89 8 months ago

  • Tags deleted (CI/CD)

#11 Updated by ipanova@redhat.com 8 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

#12 Updated by ipanova@redhat.com 7 months ago

  • Sprint/Milestone set to 1.0.0

Please register to edit this issue

Also available in: Atom PDF