mirror of https://github.com/ansible/ansible.git
Revert warning message in setup/gather_facts (#83427)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>pull/83366/head
parent
cf265eb14d
commit
6e8a7ed327
@ -1,2 +1,3 @@
|
||||
---
|
||||
bugfixes:
|
||||
- setup/gather_facts will now warn and skip missing ``sysctl`` instead of being a fatal error.
|
||||
- setup/gather_facts will skip missing ``sysctl`` instead of being a fatal error (https://github.com/ansible/ansible/pull/81297).
|
||||
|
@ -1,19 +0,0 @@
|
||||
# Copyright: Contributors to the Ansible project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.parametrize("stdin", [{}], indirect=["stdin"])
|
||||
def test_get_bin_path_warning(am, capfd):
|
||||
am.get_bin_path("non_existent_cmd", warning="skipping non_existent_cmd")
|
||||
|
||||
with pytest.raises(SystemExit):
|
||||
am.exit_json()
|
||||
out, dummy = capfd.readouterr()
|
||||
expected_warning = ["Unable to find non_existent_cmd, skipping non_existent_cmd"]
|
||||
assert json.loads(out)["warnings"] == expected_warning
|
Loading…
Reference in New Issue