redirect units

pull/83129/head
Brian Coca 1 month ago
parent 45dbe334cd
commit f28d8d9ee6

@ -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 = C.config.GALAXY_SERVER_ADDITIONAL.copy()
server_additional['timeout']['default'] = timeout_fallback
monkeypatch.setattr(galaxy, 'SERVER_ADDITIONAL', server_additional)
monkeypatch.setattr(C.config, 'GALAXY_SERVER_ADDITIONAL', server_additional)
cfg_lines.extend(["[galaxy_server.server1]", "url=https://galaxy.ansible.com/api/"])
if timeout_cfg is not None:

@ -9,7 +9,7 @@ import pytest
from unittest.mock import MagicMock
import ansible.constants as C
from ansible.cli.galaxy import GalaxyCLI, SERVER_DEF
from ansible.cli.galaxy import GalaxyCLI
from ansible.galaxy.token import GalaxyToken, NoTokenSentinel
from ansible.module_utils.common.text.converters import to_bytes, to_text
@ -35,7 +35,7 @@ def b_token_file(request, tmp_path_factory):
def test_client_id(monkeypatch):
monkeypatch.setattr(C, 'GALAXY_SERVER_LIST', ['server1', 'server2'])
test_server_config = {option[0]: None for option in SERVER_DEF}
test_server_config = {option[0]: None for option in C.config.GALAXY_SERVER_DEF}
test_server_config.update(
{
'url': 'http://my_galaxy_ng:8000/api/automation-hub/',
@ -45,7 +45,7 @@ def test_client_id(monkeypatch):
}
)
test_server_default = {option[0]: None for option in SERVER_DEF}
test_server_default = {option[0]: None for option in C.config.GALAXY_SERVER_DEF}
test_server_default.update(
{
'url': 'https://cloud.redhat.com/api/automation-hub/',

Loading…
Cancel
Save