Skip to content

Commit

Permalink
redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Nov 21, 2024
1 parent 37de29b commit 7c562af
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/foreman/sys/test_fam.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"""

from pathlib import Path

from broker import Broker
import pytest
import yaml
Expand Down Expand Up @@ -190,6 +192,12 @@ def test_positive_run_modules_and_roles(module_target_sat, setup_fam, ansible_mo

# Execute test_playbook
result = module_target_sat.execute(
f'export NO_COLOR=True && export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 && cd {FAM_ROOT_DIR} && make livetest_{ansible_module} PYTHON_COMMAND="python3" PYTEST_COMMAND="pytest-3.11"'
f'export NO_COLOR=True && export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 && cd {FAM_ROOT_DIR} && make livetest_{ansible_module} PYTHON_COMMAND="python3" PYTEST_COMMAND="pytest-3.11" >/tmp/pytest.stdout 2>/tmp/pytest.stderr'
)
assert result.status == 0, f"{result.status=}\nstdout:\n{result.stdout} stderr:\n{result.stderr}"
module_target_sat.get('/tmp/pytest.stdout', 'pytest.stdout')
module_target_sat.get('/tmp/pytest.stderr', 'pytest.stderr')

stdout = Path('pytest.stdout').read_text()
stderr = Path('pytest.stderr').read_text()

assert result.status == 0, f"{result.status=}\nstdout:\n{stdout} stderr:\n{stderr}"

0 comments on commit 7c562af

Please sign in to comment.