File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 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):
263263 "unit-test-cluster.yaml" , f"{ parent } /tests/test-case.yaml" , shallow = True
264264 )
265265
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+
266278def test_cluster_creation_no_mcad (mocker ):
267279 mocker .patch (
268280 "kubernetes.client.CustomObjectsApi.get_cluster_custom_object" ,
You can’t perform that action at this time.
0 commit comments