Public Access
Compare commits
3
Commits
v0.51.2
...
b2dd2229f1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2dd2229f1 | ||
|
|
e6be27f75f | ||
|
|
6b5cd18efb |
@@ -62,7 +62,7 @@ def _install_ansible_collections(bin_dir: str) -> None:
|
|||||||
if not requirements.exists():
|
if not requirements.exists():
|
||||||
click.echo(" ansible/requirements.yml not found — skipping collections.")
|
click.echo(" ansible/requirements.yml not found — skipping collections.")
|
||||||
return
|
return
|
||||||
_run([galaxy, "collection", "install", "-r", str(requirements)])
|
_run([galaxy, "collection", "install", "-r", str(requirements), "--no-cache"])
|
||||||
|
|
||||||
|
|
||||||
def _configure_tea_login() -> None:
|
def _configure_tea_login() -> None:
|
||||||
|
|||||||
@@ -108,6 +108,8 @@ class TestInstallAnsibleCollections:
|
|||||||
mock_path.return_value.__str__ = lambda _: str(req)
|
mock_path.return_value.__str__ = lambda _: str(req)
|
||||||
_install_ansible_collections(".venv/bin")
|
_install_ansible_collections(".venv/bin")
|
||||||
mock_run.assert_called_once()
|
mock_run.assert_called_once()
|
||||||
|
args = mock_run.call_args[0][0]
|
||||||
|
assert "--no-cache" in args, "ansible-galaxy must use --no-cache to avoid concurrent cache corruption"
|
||||||
|
|
||||||
@patch("devx.tools.setup._run")
|
@patch("devx.tools.setup._run")
|
||||||
def test_skips_when_no_requirements(self, mock_run: MagicMock) -> None:
|
def test_skips_when_no_requirements(self, mock_run: MagicMock) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user