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

Podman tests marked as xfail #532

Open
17 tasks
LewisGaul opened this issue Jan 15, 2024 · 0 comments
Open
17 tasks

Podman tests marked as xfail #532

LewisGaul opened this issue Jan 15, 2024 · 0 comments
Labels
podman Specific to podman

Comments

@LewisGaul
Copy link
Collaborator

LewisGaul commented Jan 15, 2024

A bunch of tests are marked as xfail for podman to indicate that either there's a missing functionality in python-on-whales or just in the test. Any tests that do not apply to podman (e.g. docker swarm tests) should not be parameterised with podman. This issue tracks issues relating to resolving all the podman xfails.

  • test_container.py
    • test_same_output_run_create_start(), test_same_stream_run_create_start(), test_fails_correctly(), test_fails_correctly_create_start() fail trying to run podman buildx, which doesn't exist
    • test_create_with_cgroupns() fails due to inspect issue not finding the cgroupns
    • test_diff() fails with extra "/etc": "C" item (?)
    • test_cpus() and test_stats_*() tests fail because of lack of cgroup support with rootless podman on cgroups v1
    • test_copy_nosuchcontainer() error not translated to NoSuchContainer exception
  • test_image.py
    • test_save_iterator_bytes_and_load_from_iterator_list_of_images() - podman changes the registry part of the image name to "localhost" when loading
    • test_filter_when_listing(), test_use_first_argument_to_filter() - image filtering by reference not working
    • test_pull_not_quiet_multiple_images()
    • test_no_such_image_*() podman gives different error message "Error: : image not known"
  • test_network.py
    • test_network_connect_disconnect()
  • test_volume.py
    • clone and copy don't work because they rely on buildx, which is a docker thing
    • the prune test fails because --all isn't supported by podman (not supported by older docker versions either, observed on v20.10.16, after Implement DockerClient.version() #591 is completed can skip on older versions of docker too)
    • the test running podman volume create --driver local --opt type=tmpfs --opt device=tmpfs --opt o=size=100m,uid=1000 fails with "Error: Volume options size and inodes not supported. Filesystem does not support Project Quota"

If you add this to the pytest_collection_modifyitems() hook in conftest.py then only xfail tests are run, combined with passing the pytest arg --runxfail it's easy to see the state of xfail tests.

    # Deselect all items that are not marked with 'xfail'
    remaining_items = []
    for item in items:
        if item.get_closest_marker("xfail"):
            remaining_items.append(item)
    items[:] = remaining_items
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
podman Specific to podman
Projects
None yet
Development

No branches or pull requests

1 participant