diff --git a/tests/unit/restapi/v1/conftest.py b/tests/unit/restapi/v1/conftest.py index d99a5a516..25a46042a 100644 --- a/tests/unit/restapi/v1/conftest.py +++ b/tests/unit/restapi/v1/conftest.py @@ -309,4 +309,5 @@ def registered_entrypoints( "entrypoint1": entrypoint1_response, "entrypoint2": entrypoint2_response, "entrypoint3": entrypoint3_response, + "queue": queue, } diff --git a/tests/unit/restapi/v1/test_entrypoint.py b/tests/unit/restapi/v1/test_entrypoint.py index 44b95593e..c8ea84e10 100644 --- a/tests/unit/restapi/v1/test_entrypoint.py +++ b/tests/unit/restapi/v1/test_entrypoint.py @@ -300,6 +300,10 @@ def assert_cannot_rename_entrypoint_with_existing_name( entrypoint_id: int, existing_name: str, existing_description: str, + existing_task_graph: str, + existing_parameters: list[dict[str, Any]], + existing_plugin_file_ids: list[int], + existing_queue_id: int, ) -> None: """Assert that renaming a entrypoint with an existing name fails. @@ -316,6 +320,10 @@ def assert_cannot_rename_entrypoint_with_existing_name( entrypoint_id=entrypoint_id, new_name=existing_name, new_description=existing_description, + new_task_graph=existing_task_graph, + new_parameters=existing_parameters, + new_plugin_file_ids=existing_plugin_file_ids, + new_queue_id=existing_queue_id, ) assert response.status_code == 400 @@ -509,7 +517,7 @@ def test_rename_entrypoint( new_task_graph=entrypoint_to_rename["taskGraph"], new_parameters=entrypoint_to_rename["parameters"], new_plugin_file_ids=entrypoint_to_rename["pluginFiles"], - new_queue_id=entrypoint_to_rename["queue"]["id"], + new_queue_id=registered_entrypoints["queue"]["id"], ).get_json() assert_entrypoint_name_matches_expected_name( client, @@ -531,7 +539,7 @@ def test_rename_entrypoint( new_task_graph=entrypoint_to_rename["taskGraph"], new_parameters=entrypoint_to_rename["parameters"], new_plugin_file_ids=entrypoint_to_rename["pluginFiles"], - new_queue_id=entrypoint_to_rename["queue"]["id"], + new_queue_id=registered_entrypoints["queue"]["id"], ).get_json() assert_entrypoint_name_matches_expected_name( client, @@ -544,6 +552,10 @@ def test_rename_entrypoint( entrypoint_id=entrypoint_to_rename["id"], existing_name=existing_entrypoint["name"], existing_description=entrypoint_to_rename["description"], + existing_task_graph=entrypoint_to_rename["taskGraph"], + existing_parameters=entrypoint_to_rename["parameters"], + existing_plugin_file_ids=entrypoint_to_rename["pluginFiles"], + existing_queue_id=registered_entrypoints["queue"]["id"], )