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
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Oct 20, 2020
1 parent 1a0f82c commit a4f5d02
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest_plugins = ["helpers_namespace"]
12 changes: 12 additions & 0 deletions lib/molecule_podman/test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
"""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 a4f5d02

Please sign in to comment.