@@ -56,7 +56,9 @@ def test_build(self, mock_call: MagicMock):
56
56
57
57
self .assertTrue (image .built )
58
58
self .assertEqual (image_name , "test-challenge" )
59
- mock_call .assert_called_once_with (["docker" , "build" , "-t" , "test-challenge" , "." ], cwd = build_path .absolute ())
59
+ mock_call .assert_called_once_with (
60
+ ["docker" , "build" , "--load" , "-t" , "test-challenge" , "." ], cwd = build_path .absolute ()
61
+ )
60
62
61
63
@mock .patch ("ctfcli.core.image.subprocess.call" , return_value = 1 )
62
64
def test_build_returns_none_if_failed (self , mock_call : MagicMock ):
@@ -68,7 +70,9 @@ def test_build_returns_none_if_failed(self, mock_call: MagicMock):
68
70
69
71
self .assertFalse (image .built )
70
72
self .assertIsNone (image_name )
71
- mock_call .assert_called_once_with (["docker" , "build" , "-t" , "test-challenge" , "." ], cwd = build_path .absolute ())
73
+ mock_call .assert_called_once_with (
74
+ ["docker" , "build" , "--load" , "-t" , "test-challenge" , "." ], cwd = build_path .absolute ()
75
+ )
72
76
73
77
@mock .patch ("ctfcli.core.image.subprocess.call" , return_value = 0 )
74
78
def test_push_built_image (self , mock_call : MagicMock ):
@@ -150,7 +154,7 @@ def test_builds_image_before_push(self, mock_call: MagicMock):
150
154
mock_call .assert_has_calls (
151
155
[
152
156
call (
153
- ["docker" , "build" , "-t" , "test-challenge" , "." ],
157
+ ["docker" , "build" , "--load" , "- t" , "test-challenge" , "." ],
154
158
cwd = build_path .absolute (),
155
159
),
156
160
call (
@@ -224,7 +228,7 @@ def test_builds_image_before_export(self, mock_call: MagicMock):
224
228
mock_call .assert_has_calls (
225
229
[
226
230
call (
227
- ["docker" , "build" , "-t" , "test-challenge" , "." ],
231
+ ["docker" , "build" , "--load" , "- t" , "test-challenge" , "." ],
228
232
cwd = build_path .absolute (),
229
233
),
230
234
call (
0 commit comments