mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-24 12:49:03 +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:
parent
9ef1dbb6d5
commit
4fa82b9617
807 changed files with 2041 additions and 1702 deletions
|
|
@ -37,7 +37,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(): stonith status → not found (rc=1)
|
||||
|
|
@ -87,12 +87,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),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue