Skip to content

Commit

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

from broker import Broker
from pathlib import Path
import pytest
import yaml

Expand Down Expand Up @@ -190,6 +191,12 @@ def test_positive_run_modules_and_roles(module_target_sat, setup_fam, ansible_mo

# Execute test_playbook
result = module_target_sat.execute(
f'cd {FAM_ROOT_DIR} && pytest-3.11 "tests/test_crud.py::test_crud[{ansible_module}]" --vcrmode=live --color=no'
f'cd {FAM_ROOT_DIR} && pytest-3.11 "tests/test_crud.py::test_crud[{ansible_module}]" --vcrmode=live --color=no >/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 cbe0e6f

Please sign in to comment.