mirror of
https://github.com/mrlesmithjr/ansible-manage-lvm.git
synced 2026-02-04 08:49:13 +03:00
use symbolic links instead of replicating files
This commit is contained in:
@@ -1,21 +0,0 @@
|
|||||||
"""PyTest Fixtures."""
|
|
||||||
from __future__ import absolute_import
|
|
||||||
import os
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
|
|
||||||
def pytest_runtest_setup(item):
|
|
||||||
"""Run tests only when under molecule with testinfra installed."""
|
|
||||||
try:
|
|
||||||
import testinfra
|
|
||||||
except ImportError:
|
|
||||||
pytest.skip("Test requires testinfra", allow_module_level=True)
|
|
||||||
if "MOLECULE_INVENTORY_FILE" in os.environ:
|
|
||||||
pytest.testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|
||||||
os.environ["MOLECULE_INVENTORY_FILE"]
|
|
||||||
).get_hosts("all")
|
|
||||||
else:
|
|
||||||
pytest.skip(
|
|
||||||
"Test should run only from inside molecule.",
|
|
||||||
allow_module_level=True
|
|
||||||
)
|
|
||||||
1
molecule/kvmonlyvg/tests/conftest.py
Symbolic link
1
molecule/kvmonlyvg/tests/conftest.py
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../default/tests/conftest.py
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
"""PyTest Fixtures."""
|
|
||||||
from __future__ import absolute_import
|
|
||||||
import os
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
|
|
||||||
def pytest_runtest_setup(item):
|
|
||||||
"""Run tests only when under molecule with testinfra installed."""
|
|
||||||
try:
|
|
||||||
import testinfra
|
|
||||||
except ImportError:
|
|
||||||
pytest.skip("Test requires testinfra", allow_module_level=True)
|
|
||||||
if "MOLECULE_INVENTORY_FILE" in os.environ:
|
|
||||||
pytest.testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|
||||||
os.environ["MOLECULE_INVENTORY_FILE"]
|
|
||||||
).get_hosts("all")
|
|
||||||
else:
|
|
||||||
pytest.skip(
|
|
||||||
"Test should run only from inside molecule.",
|
|
||||||
allow_module_level=True
|
|
||||||
)
|
|
||||||
1
molecule/kvmsinglelv/tests/conftest.py
Symbolic link
1
molecule/kvmsinglelv/tests/conftest.py
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../default/tests/conftest.py
|
||||||
Reference in New Issue
Block a user