File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -87,10 +87,25 @@ def test_run(
8787 mock_subprocess .return_value = 0
8888
8989 # Mock 'build_image' return values
90- mock_build . side_effect = [
90+ image_paths = [
9191 f"{ dst if dst else def_dst } /{ image [0 ]} :{ tags [0 ] if tags else def_tags [0 ]} "
9292 for image in images
9393 ]
94+ mock_build .side_effect = image_paths
95+
96+ # Mock all the return values when tagging the images
97+ all_tags = [
98+ f"{ image .split (':' )[0 ]} :{ tag } "
99+ for image in image_paths
100+ for tag in (tags if tags else def_tags )
101+ ]
102+ mock_tag .side_effect = all_tags
103+
104+ # Mock the push function
105+ mock_push .return_value = True
106+
107+ # Mock the cleanup function
108+ mock_clean .return_value = True
94109
95110 # Run the function with the command
96111 run ()
You can’t perform that action at this time.
0 commit comments