From d1bc003ce9b354cdaee57104e4d9ec882c5c3bd9 Mon Sep 17 00:00:00 2001 From: Romulo Quidute Filho Date: Mon, 21 Oct 2024 12:50:29 +0000 Subject: [PATCH] Add checking when no PICS were informed --- app/api/api_v1/endpoints/test_run_executions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/api/api_v1/endpoints/test_run_executions.py b/app/api/api_v1/endpoints/test_run_executions.py index a67a8e98..d992fe7a 100644 --- a/app/api/api_v1/endpoints/test_run_executions.py +++ b/app/api/api_v1/endpoints/test_run_executions.py @@ -161,6 +161,11 @@ def start_test_run_execution( status_code=HTTPStatus.NOT_FOUND, detail="Test Run Execution not found" ) + if len(test_run_execution.project.pics.clusters) == 0: + raise HTTPException( + status_code=HTTPStatus.NOT_FOUND, detail="No PICS were informed" + ) + test_runner = TestRunner() try: