|
|
|
@ -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/',
|
|
|
|
|