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

Alternative to hardcoding image names in tests #375

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Alternative to hardcoding image names in tests #375

wants to merge 5 commits into from

Conversation

kmehant
Copy link
Contributor

@kmehant kmehant commented Dec 16, 2019

fixes #324

@centos-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@rpitonak
Copy link
Collaborator

/packit copr-build

@rpitonak
Copy link
Collaborator

[test]

@packit-as-a-service
Copy link

Congratulations! The build has finished successfully. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/user-cont-conu-375
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@TomasTomecek
Copy link
Member

/packit build

Copy link
Member

@TomasTomecek TomasTomecek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Can we bump the test images to fedora:31? :) to make sure this works globally

@kmehant
Copy link
Contributor Author

kmehant commented Jan 7, 2020

@TomasTomecek I have updated to version 31 wherever possible :)

@TomasTomecek
Copy link
Member

/packit build

@TomasTomecek
Copy link
Member

[test]

Copy link
Member

@TomasTomecek TomasTomecek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the CI failure:

17:02:26 Trying to pull registry.fedoraproject.org/fedora...
17:02:26   Get https://registry.fedoraproject.org/v2/fedora/manifests/sha256:687fe5e65ecc0d3082318b1285dfc553b2a5d794c6c0831155c303fdf328de90: net/http: TLS handshake timeout
17:02:26 Error: error pulling image "registry.fedoraproject.org/fedora": unable to pull registry.fedoraproject.org/fedora: unable to pull image: Error determining manifest MIME type for docker://registry.fedoraproject.org/fedora:latest: Get https://registry.fedoraproject.org/v2/fedora/manifests/sha256:687fe5e65ecc0d3082318b1285dfc553b2a5d794c6c0831155c303fdf328de90: net/http: TLS handshake timeout

tests/constants.py Outdated Show resolved Hide resolved
Co-Authored-By: Tomas Tomecek <[email protected]>
@TomasTomecek
Copy link
Member

[test]

@TomasTomecek
Copy link
Member

/packit build

@TomasTomecek
Copy link
Member

tried to run the podman tests locally and got a single error:

_____________________________________________________________________________ test_podman_image _____________________________________________________________________________
                                                                                                                                                                             
podman_backend = <conu.backend.podman.backend.PodmanBackend object at 0x7fb4aa4c3c10>                                                                                        
                                                                                                                                                                             
    def test_podman_image(podman_backend):                                                                                                                                   
        """
        Test interaction with an image
        """
        image = podman_backend.ImageClass(FEDORA_MINIMAL_REPOSITORY, tag=FEDORA_MINIMAL_REPOSITORY_TAG)
        assert "%s:%s" % (FEDORA_MINIMAL_REPOSITORY, FEDORA_MINIMAL_REPOSITORY_TAG) == image.get_full_name()
        assert "%s:%s" % (FEDORA_MINIMAL_REPOSITORY, FEDORA_MINIMAL_REPOSITORY_TAG) in image.inspect()['RepoTags']
        assert "Config" in image.inspect()
>       assert re.match(FEDORA_MINIMAL_NAME_REGEX, image.get_full_name())
E       AssertionError: assert None
E        +  where None = <function match at 0x7fb4c308b290>('fedora-minimal:([0-9])+', 'registry.fedoraproject.org/fedora-minimal:31')
E        +    where <function match at 0x7fb4c308b290> = re.match
E        +    and   'registry.fedoraproject.org/fedora-minimal:31' = <bound method PodmanImage.get_full_name of PodmanImage(repository=registry.fedoraproject.org/fedora-mini
mal, tag=31)>()
E        +      where <bound method PodmanImage.get_full_name of PodmanImage(repository=registry.fedoraproject.org/fedora-minimal, tag=31)> = PodmanImage(repository=registry
.fedoraproject.org/fedora-minimal, tag=31).get_full_name

image      = PodmanImage(repository=registry.fedoraproject.org/fedora-minimal, tag=31) 
podman_backend = <conu.backend.podman.backend.PodmanBackend object at 0x7fb4aa4c3c10>

Copy link
Member

@TomasTomecek TomasTomecek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the test_buildah_image, test_image and test_podman_image failures and we're good to merge; other test failures are unrelated

@kmehant
Copy link
Contributor Author

kmehant commented Jan 14, 2020

@TomasTomecek This is my local test report on total I have fixed test_buildah_image PASSED test_podman_image PASSED test_image PASSED as you have mentioned :)

test_podman.py ALL TESTS PASSED

test_buildah.py 2 TESTS FAILED
     test_buildah_image PASSED
     test_container_metadata FAILED
     test_image_metadata FAILED

test_docker.py 1 TESTS FAILED
     test_image PASSED   
     test_copy_from FAILED

@TomasTomecek
Copy link
Member

[test]

@TomasTomecek
Copy link
Member

/packit build

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.

use F29 as a testing image
4 participants