diff --git a/tests/unit/test_app.py b/tests/unit/test_app.py index 7828c318..49903d37 100644 --- a/tests/unit/test_app.py +++ b/tests/unit/test_app.py @@ -78,6 +78,20 @@ def test_local_dir_image_name(repo_with_content): ) +def test_extra_buildx_build_args(repo_with_content): + upstream, sha1 = repo_with_content + argv = ['--DockerEngine.extra_buildx_build_args=--check', upstream] + app = make_r2d(argv) + with patch("repo2docker.docker.execute_cmd") as execute_cmd: + app.build() + + args, kwargs = execute_cmd.call_args + cmd = args[0] + assert cmd[:3] == ["docker", "buildx", "build"] + # make sure it's inserted before the end + assert "--check" in cmd[:-1] + + def test_run_kwargs(repo_with_content): upstream, sha1 = repo_with_content argv = [upstream]