diff options
author | Abhijeet Kasurde <akasurde@redhat.com> | 2024-06-11 21:01:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 21:01:29 +0200 |
commit | 6e8a7ed327e078b814e5963968f041973e955a50 (patch) | |
tree | d2b4112058cc4a2062203dbc75cb0da466db6c07 /test | |
parent | Add Python 3.13 support (#83416) (diff) | |
download | ansible-6e8a7ed327e078b814e5963968f041973e955a50.tar.xz ansible-6e8a7ed327e078b814e5963968f041973e955a50.zip |
Revert warning message in setup/gather_facts (#83427)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/units/module_utils/basic/test_get_bin_path.py | 19 | ||||
-rw-r--r-- | test/units/module_utils/facts/network/test_fc_wwn.py | 2 | ||||
-rw-r--r-- | test/units/module_utils/facts/network/test_generic_bsd.py | 2 |
3 files changed, 2 insertions, 21 deletions
diff --git a/test/units/module_utils/basic/test_get_bin_path.py b/test/units/module_utils/basic/test_get_bin_path.py deleted file mode 100644 index bac656ea9c..0000000000 --- a/test/units/module_utils/basic/test_get_bin_path.py +++ /dev/null @@ -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 diff --git a/test/units/module_utils/facts/network/test_fc_wwn.py b/test/units/module_utils/facts/network/test_fc_wwn.py index ec22c19bbd..fd0cc3e928 100644 --- a/test/units/module_utils/facts/network/test_fc_wwn.py +++ b/test/units/module_utils/facts/network/test_fc_wwn.py @@ -89,7 +89,7 @@ FCMSUTIL_OUT = """ """ -def mock_get_bin_path(cmd, required=False, opt_dirs=None, warning=None): +def mock_get_bin_path(cmd, required=False, opt_dirs=None): cmds = { 'lsdev': '/usr/sbin/lsdev', 'lscfg': '/usr/sbin/lscfg', diff --git a/test/units/module_utils/facts/network/test_generic_bsd.py b/test/units/module_utils/facts/network/test_generic_bsd.py index c66b00cc56..3b26f0a0e1 100644 --- a/test/units/module_utils/facts/network/test_generic_bsd.py +++ b/test/units/module_utils/facts/network/test_generic_bsd.py @@ -9,7 +9,7 @@ import pytest from ansible.module_utils.facts.network import generic_bsd -def mock_get_bin_path(command, warning=None): +def mock_get_bin_path(command): cmds = { 'ifconfig': 'fake/ifconfig', 'route': 'fake/route', |