Skip to content

switch auto_remove with remove in codegen and tests #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/rpdk/python/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def _docker_build(cls, external_path):
logs = docker_client.containers.run(
image=image,
command=command,
auto_remove=True,
remove=True,
volumes=volumes,
stream=True,
entrypoint="",
Expand Down
10 changes: 5 additions & 5 deletions tests/plugin/codegen_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def test__build_docker_posix(plugin):
mock_run.assert_called_once_with(
image=ANY,
command=ANY,
auto_remove=True,
remove=True,
volumes={str(sentinel.base_path): {"bind": "/project", "mode": "rw"}},
stream=True,
entrypoint="",
Expand All @@ -470,7 +470,7 @@ def test__build_docker_windows(plugin):
mock_run.assert_called_once_with(
image=ANY,
command=ANY,
auto_remove=True,
remove=True,
volumes={str(sentinel.base_path): {"bind": "/project", "mode": "rw"}},
stream=True,
entrypoint="",
Expand Down Expand Up @@ -498,7 +498,7 @@ def test__build_docker_no_euid(plugin):
mock_run.assert_called_once_with(
image=ANY,
command=ANY,
auto_remove=True,
remove=True,
volumes={str(sentinel.base_path): {"bind": "/project", "mode": "rw"}},
stream=True,
entrypoint="",
Expand All @@ -518,7 +518,7 @@ def test__docker_build_good_path(plugin, tmp_path):
mock_run.assert_called_once_with(
image=ANY,
command=ANY,
auto_remove=True,
remove=True,
volumes={str(tmp_path): {"bind": "/project", "mode": "rw"}},
stream=True,
entrypoint="",
Expand Down Expand Up @@ -560,7 +560,7 @@ def test__docker_build_bad_path(plugin, tmp_path, exception):
mock_run.assert_called_once_with(
image=ANY,
command=ANY,
auto_remove=True,
remove=True,
volumes={str(tmp_path): {"bind": "/project", "mode": "rw"}},
stream=True,
entrypoint="",
Expand Down