Add extra_args test

Co-authored-by: Min RK <benjaminrk@gmail.com>
pull/1413/head
Yuvi Panda 2025-02-11 12:17:14 -08:00 zatwierdzone przez GitHub
rodzic 087c332638
commit 07ef92ecbd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -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]