From 32cd2106639c9af3858afafb9aba540bafcc33ca Mon Sep 17 00:00:00 2001 From: Horea Christian Date: Thu, 25 Apr 2024 17:38:04 -0400 Subject: [PATCH] Adding test template to develop gentoo support --- .../cli/tests/test_build_images_with_cli.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/neurodocker/cli/tests/test_build_images_with_cli.py b/neurodocker/cli/tests/test_build_images_with_cli.py index f5444535..23d50473 100644 --- a/neurodocker/cli/tests/test_build_images_with_cli.py +++ b/neurodocker/cli/tests/test_build_images_with_cli.py @@ -113,3 +113,23 @@ def test_json_roundtrip(cmd: str, inputs: str, tmp_path: Path): stdout, _ = run_fn(img, args=["env"]) assert "CAT=FOO" in stdout assert "DOG=BAR" in stdout + +def test_gentoo_image(tmp_path: Path): + # also add singularity like in the test above + + cmd = "neurodocker generate docker" + + _TemplateRegistry._reset() + runner = CliRunner() + result = runner.invoke( + generate, + [ + cmd, + "--pkg-manager apt", + "--base-image neurodebian:bullseye", + "--ants version=2.4.3", + "--user nonroot" + ], + ) + assert result.exit_code == 0, result.output + (tmp_path / "specs.json").write_text(result.output)