mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Adding a check to skip mac_assistive tests if the osa_script is unable to be installed.
This commit is contained in:
parent
fcca388664
commit
e19400c36b
1 changed files with 7 additions and 1 deletions
|
@ -4,6 +4,8 @@
|
|||
|
||||
import pytest
|
||||
|
||||
from salt.exceptions import CommandExecutionError
|
||||
|
||||
pytestmark = [
|
||||
pytest.mark.destructive_test,
|
||||
pytest.mark.skip_if_not_root,
|
||||
|
@ -23,7 +25,11 @@ def osa_script():
|
|||
|
||||
@pytest.fixture(scope="function", autouse=True)
|
||||
def _setup_teardown_vars(assistive, osa_script):
|
||||
assistive.install(osa_script, True)
|
||||
try:
|
||||
ret = assistive.install(osa_script, True)
|
||||
except CommandExecutionError as exc:
|
||||
pytest.skip(f"Unable to install {osa_script} - {str(exc.value)}")
|
||||
|
||||
try:
|
||||
yield
|
||||
finally:
|
||||
|
|
Loading…
Add table
Reference in a new issue