user-cont / conu

conu - python API for your containers
http://conu.readthedocs.io/en/latest/
MIT License
164 stars 33 forks source link

Alternative to hardcoding image names in tests #375

Open kmehant opened 4 years ago

kmehant commented 4 years ago

fixes #324

centos-ci commented 4 years ago

Can one of the admins verify this patch?

rpitonak commented 4 years ago

/packit copr-build

rpitonak commented 4 years ago

[test]

packit-as-a-service[bot] commented 4 years ago

Congratulations! The build has finished successfully. :champagne:

You can install the built RPMs by following these steps:

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

TomasTomecek commented 4 years ago

/packit build

kmehant commented 4 years ago

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

TomasTomecek commented 4 years ago

/packit build

TomasTomecek commented 4 years ago

[test]

TomasTomecek commented 4 years ago

[test]

TomasTomecek commented 4 years ago

/packit build

TomasTomecek commented 4 years ago

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>
kmehant commented 4 years ago

@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 commented 4 years ago

[test]

TomasTomecek commented 4 years ago

/packit build