1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-24 20:59:16 +00:00

Make all doc fragments, module utils, and plugin utils private (#11896)

* Make all doc fragments private.

* Make all plugin utils private.

* Make all module utils private.

* Reformat.

* Changelog fragment.

* Update configs and ignores.

* Adjust unit test names.
This commit is contained in:
Felix Fontein 2026-04-20 20:16:26 +02:00 committed by GitHub
parent 9ef1dbb6d5
commit 4fa82b9617
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
807 changed files with 2041 additions and 1702 deletions

View file

@ -45,7 +45,7 @@ def patch_bin(mocker):
@pytest.mark.usefixtures("patch_bin")
def test_present_race_condition_stopped_then_started(mocker, capfd):
"""Resource reports Stopped on the first poll then Started on the second — must succeed."""
mocker.patch("ansible_collections.community.general.plugins.module_utils.pacemaker.time.sleep")
mocker.patch("ansible_collections.community.general.plugins.module_utils._pacemaker.time.sleep")
# Sequence of run_command calls:
# 1. initial _get(): resource status → not found (rc=1)
@ -99,12 +99,12 @@ def test_present_race_condition_stopped_then_started(mocker, capfd):
@pytest.mark.usefixtures("patch_bin")
def test_present_wait_timeout_raises(mocker, capfd):
"""Resource never starts within the wait window — must fail with a timeout message."""
mocker.patch("ansible_collections.community.general.plugins.module_utils.pacemaker.time.sleep")
mocker.patch("ansible_collections.community.general.plugins.module_utils._pacemaker.time.sleep")
# Simulate time advancing past the deadline immediately on the first poll
monotonic_values = iter([0.0, 999.0])
mocker.patch(
"ansible_collections.community.general.plugins.module_utils.pacemaker.time.monotonic",
"ansible_collections.community.general.plugins.module_utils._pacemaker.time.monotonic",
side_effect=lambda: next(monotonic_values),
)