Skip to content

Commit c5eaf2d

Browse files
committed
test: make 'run_load_task' fixture's defaults match up
1 parent d4f72f7 commit c5eaf2d

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

test/test_docker.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@ def side_effect(topsrcdir, context_dir, out_file, image_name=None, args=None):
4444
def run_load_task(mocker):
4545
def inner(
4646
task,
47-
remove=False,
48-
custom_image=None,
4947
pass_task_def=False,
50-
interactive=True,
51-
volumes=None,
48+
**kwargs,
5249
):
5350
proc = mocker.MagicMock()
5451
proc.returncode = 0
@@ -93,10 +90,7 @@ def inner(
9390
ret = docker.load_task(
9491
graph_config,
9592
input_arg,
96-
remove=remove,
97-
custom_image=custom_image,
98-
interactive=interactive,
99-
volumes=volumes,
93+
**kwargs
10094
)
10195
return ret, mocks
10296

@@ -141,7 +135,7 @@ def test_load_task(run_load_task):
141135
("/host/path", "/container/path"),
142136
("/another/host", "/another/container"),
143137
]
144-
ret, mocks = run_load_task(task, volumes=volumes)
138+
ret, mocks = run_load_task(task, remove=False, interactive=True, volumes=volumes)
145139
assert ret == 0
146140

147141
if "get_task_definition" in mocks:
@@ -223,7 +217,7 @@ def test_load_task_env_init_and_remove(mocker, run_load_task):
223217
"image": {"taskId": image_task_id, "type": "task-image"},
224218
},
225219
}
226-
ret, mocks = run_load_task(task, remove=True, volumes=[("/host/path", "/cache")])
220+
ret, mocks = run_load_task(task, interactive=True, volumes=[("/host/path", "/cache")])
227221
assert ret == 0
228222

229223
# NamedTemporaryFile was called twice (once for env, once for init)
@@ -410,6 +404,7 @@ def test_load_task_with_interactive_false(run_load_task):
410404
"run",
411405
"-i",
412406
"-t",
407+
"--rm",
413408
"image/tag",
414409
"echo",
415410
"hello world",

0 commit comments

Comments
 (0)