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

test: detect broken podman #2483

Merged
merged 1 commit into from
Jan 5, 2020
Merged

test: detect broken podman #2483

merged 1 commit into from
Jan 5, 2020

Conversation

ssbarnea
Copy link
Member

@ssbarnea ssbarnea commented Jan 5, 2020

Improved podman detection so we fail fast if current installation does
not pass podman info minimal test. This should save time running
tests on systems what are not properly configured.

Skips will happen only on platforms that are known not to support
podman, but on those supporting it, tests will fail.

Enables lru_cache on podman/docker checks in order to improve
testing runtime performance.

I faced containers/podman#4665 on a RHEL 8 where:

podman info
Error: could not get runtime: please update to v2.0.1 or later: outdated conmon version

@ssbarnea ssbarnea self-assigned this Jan 5, 2020
@ssbarnea ssbarnea added test Improvement to quality assurance: CI/CD, testing, building skip-changelog labels Jan 5, 2020
@ssbarnea ssbarnea added this to the 3.0 milestone Jan 5, 2020
def get_virtualbox_executable():
return distutils.spawn.find_executable('VBoxManage')


@pytest.helpers.register
@util.lru_cache
Copy link
Contributor

Choose a reason for hiding this comment

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

is this related to the commit?

podman = get_podman_executable()
if podman:
result = util.run([podman, "info"], stdout=PIPE, universal_newlines=True)
if result.returncode != 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather use failfast here instead of nested if/if/if but not critical.

molecule/test/functional/conftest.py Outdated Show resolved Hide resolved
molecule/test/functional/conftest.py Outdated Show resolved Hide resolved
Improved podman detection so we fail fast if current installation does
not pass `podman info` minimal test. This should save time running
tests on systems what are not properly configured.

Skips will happen only on platforms that are known not to support
podman, but on those supporting it, tests will fail.

Enables lru_cache on podman/docker checks in order to improve
testing runtime performance.
@ssbarnea ssbarnea merged commit 17323ef into ansible:master Jan 5, 2020
@ssbarnea ssbarnea deleted the master2 branch September 7, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog test Improvement to quality assurance: CI/CD, testing, building
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants