File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,18 @@ def test_cluster_creation(mocker):
263
263
"unit-test-cluster.yaml" , f"{ parent } /tests/test-case.yaml" , shallow = True
264
264
)
265
265
266
+ def test_create_app_wrapper_raises_error_with_no_image ():
267
+ config = createClusterConfig ()
268
+ config .image = "" # Clear the image to test error handling
269
+ try :
270
+ cluster = Cluster (config )
271
+ cluster .create_app_wrapper ()
272
+ assert False , "Expected ValueError when 'image' is not specified."
273
+ except ValueError as error :
274
+ assert str (error ) == "Image must be specified in the ClusterConfiguration" , \
275
+ "Error message did not match expected output."
276
+
277
+
266
278
def test_cluster_creation_no_mcad (mocker ):
267
279
mocker .patch (
268
280
"kubernetes.client.CustomObjectsApi.get_cluster_custom_object" ,
You can’t perform that action at this time.
0 commit comments