Skip to content

Commit c69a790

Browse files
committed
Logic for preparing return value of 'tag_image' was incorrect
1 parent 336ea0b commit c69a790

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/cli/test_build_images.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,20 @@ def test_run(
109109

110110
# Construct images that will be generated at the different stages of the process
111111
built_images: list[str] = []
112-
other_tags: list[str] = []
112+
other_tags: list[list[str]] = []
113113
images_to_push: list[str] = []
114114
for image in images:
115115
built_image = (
116116
f"{dst if dst else def_dst}/{image}:{tags[0] if tags else def_tags[0]}"
117117
)
118118
built_images.append(built_image)
119119
images_to_push.append(built_image)
120-
for tag in (tags if tags else def_tags)[1:]:
121-
new_tag = f"{built_image.split(':')[0]}:{tag}"
122-
other_tags.append(new_tag)
123-
images_to_push.append(new_tag)
120+
new_tags = [
121+
f"{built_image.split(':')[0]}:{tag}"
122+
for tag in (tags if tags else def_tags)[1:]
123+
]
124+
other_tags.append(new_tags)
125+
images_to_push.extend(new_tags)
124126

125127
# Mock the return values of 'build_image' and 'tag_iamge'
126128
mock_build.side_effect = built_images

0 commit comments

Comments
 (0)