conu
conu copied to clipboard
Alternative to hardcoding image names in tests
fixes #324
Can one of the admins verify this patch?
/packit copr-build
[test]
Congratulations! The build has finished successfully. :champagne:
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.
/packit build
@TomasTomecek I have updated to version 31 wherever possible :)
/packit build
[test]
[test]
/packit build
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>
@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
[test]
/packit build