Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Commit

Permalink
Verify presence of CONTAINER_HOST (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Oct 28, 2020
1 parent 1a0f82c commit 8b318e4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Pytest Config."""

pytest_plugins = ["helpers_namespace"]
11 changes: 11 additions & 0 deletions lib/molecule_podman/test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
"""Pytest Fixtures."""
import os
import platform

import pytest
from molecule.test.conftest import random_string, temp_dir # noqa


def pytest_collection_finish(session):
"""Fail fast if current environment is broken."""
if "CONTAINER_HOST" in os.environ and platform.system() != "Darwin":
pytest.exit(
msg="CONTAINER_HOST is defined, see https://github.com/containers/podman/issues/8070"
)


@pytest.fixture
def DRIVER():
"""Return name of the driver to be tested."""
Expand Down
1 change: 0 additions & 1 deletion lib/molecule_podman/test/test_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def format_result(result: subprocess.CompletedProcess):
)


# @pytest.mark.xfail(reason="need to fix template path")
def test_command_init_scenario(temp_dir, DRIVER):
"""Verify that init scenario works."""
role_directory = os.path.join(temp_dir.strpath, "test-init")
Expand Down

0 comments on commit 8b318e4

Please sign in to comment.