|
|
|
@ -18,8 +18,8 @@ from unittest.mock import MagicMock, mock_open, patch
|
|
|
|
|
|
|
|
|
|
import ansible.constants as C
|
|
|
|
|
from ansible import context
|
|
|
|
|
from ansible.cli import galaxy
|
|
|
|
|
from ansible.cli.galaxy import GalaxyCLI
|
|
|
|
|
from ansible.config import manager
|
|
|
|
|
from ansible.errors import AnsibleError
|
|
|
|
|
from ansible.galaxy import api, collection, token
|
|
|
|
|
from ansible.module_utils.common.text.converters import to_bytes, to_native, to_text
|
|
|
|
@ -414,9 +414,9 @@ def test_timeout_server_config(timeout_cli, timeout_cfg, timeout_fallback, expec
|
|
|
|
|
cfg_lines.append(f"server_timeout={timeout_fallback}")
|
|
|
|
|
|
|
|
|
|
# fix default in server config since C.GALAXY_SERVER_TIMEOUT was already evaluated
|
|
|
|
|
server_additional = galaxy.SERVER_ADDITIONAL.copy()
|
|
|
|
|
server_additional = manager.GALAXY_SERVER_ADDITIONAL.copy()
|
|
|
|
|
server_additional['timeout']['default'] = timeout_fallback
|
|
|
|
|
monkeypatch.setattr(galaxy, 'SERVER_ADDITIONAL', server_additional)
|
|
|
|
|
monkeypatch.setattr(manager, 'GALAXY_SERVER_ADDITIONAL', server_additional)
|
|
|
|
|
|
|
|
|
|
cfg_lines.extend(["[galaxy_server.server1]", "url=https://galaxy.ansible.com/api/"])
|
|
|
|
|
if timeout_cfg is not None:
|
|
|
|
|