Skip to content

Commit e5bbb8f

Browse files
authored
switch auto_remove with remove in codegen and tests (#221)
1 parent a672fb3 commit e5bbb8f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

python/rpdk/python/codegen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def _docker_build(cls, external_path):
370370
logs = docker_client.containers.run(
371371
image=image,
372372
command=command,
373-
auto_remove=True,
373+
remove=True,
374374
volumes=volumes,
375375
stream=True,
376376
entrypoint="",

tests/plugin/codegen_test.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ def test__build_docker_posix(plugin):
621621
mock_run.assert_called_once_with(
622622
image=ANY,
623623
command=ANY,
624-
auto_remove=True,
624+
remove=True,
625625
volumes={str(sentinel.base_path): {"bind": "/project", "mode": "rw"}},
626626
stream=True,
627627
entrypoint="",
@@ -648,7 +648,7 @@ def test__build_docker_windows(plugin):
648648
mock_run.assert_called_once_with(
649649
image=ANY,
650650
command=ANY,
651-
auto_remove=True,
651+
remove=True,
652652
volumes={str(sentinel.base_path): {"bind": "/project", "mode": "rw"}},
653653
stream=True,
654654
entrypoint="",
@@ -678,7 +678,7 @@ def test__build_docker_no_euid(plugin):
678678
mock_run.assert_called_once_with(
679679
image=ANY,
680680
command=ANY,
681-
auto_remove=True,
681+
remove=True,
682682
volumes={str(sentinel.base_path): {"bind": "/project", "mode": "rw"}},
683683
stream=True,
684684
entrypoint="",
@@ -699,7 +699,7 @@ def test__docker_build_good_path(plugin, tmp_path):
699699
mock_run.assert_called_once_with(
700700
image=ANY,
701701
command=ANY,
702-
auto_remove=True,
702+
remove=True,
703703
volumes={str(tmp_path): {"bind": "/project", "mode": "rw"}},
704704
stream=True,
705705
entrypoint="",
@@ -742,7 +742,7 @@ def test__docker_build_bad_path(plugin, tmp_path, exception):
742742
mock_run.assert_called_once_with(
743743
image=ANY,
744744
command=ANY,
745-
auto_remove=True,
745+
remove=True,
746746
volumes={str(tmp_path): {"bind": "/project", "mode": "rw"}},
747747
stream=True,
748748
entrypoint="",

0 commit comments

Comments
 (0)