code: def test_deploy_through_config_succeed(check_obj_ref_ready_nowait):
      """Test deploying through config successfully.
      Deploy obj ref finishes successfully, so status should transition to running.
      """
      kv_store = MockKVStore()
      deployment_id = DeploymentID("a", "test_app")
      deployment_state_manager = MockDeploymentStateManager(kv_store)
      app_state_manager = ApplicationStateManager(
          deployment_state_manager, MockEndpointState(), kv_store
      )
  
      # Deploy config
      app_config = ServeApplicationSchema(
          import_path="fa.ke", route_prefix="/new"
      )
      app_state_manager.deploy_config(
          name="test_app", app_config=app_config
      )
      app_state = app_state_manager._application_states["test_app"]
      assert app_state.status == ApplicationStatus.DEPLOYING
  
      # Before object ref is ready
      check_obj_ref_ready_nowait.return_value = False
      app_state.update()
      assert app_state._build_app_task_info
      assert app_state.status == ApplicationStatus.DEPLOYING
      app_state.update()
      assert app_state.status == ApplicationStatus.DEPLOYING
  
      # Object ref is ready
      check_obj_ref_ready_nowait.return_value = True
      app_state.update()
      assert app_state.status == ApplicationStatus.DEPLOYING
      assert app_state.target_deployments == ["a"]
      assert app_state.route_prefix == "/new"
      assert app_state.docs_path == "/docs"
  
      # Set healthy
      deployment_state_manager.set_deployment_healthy(deployment_id)
      app_state.update()
      assert app_state.status == ApplicationStatus.RUNNING
  
imports: import sys
  from typing import Dict, List, Tuple
  from unittest.mock import Mock, PropertyMock, patch
  import pytest
  from ray.exceptions import RayTaskError
  from ray.serve._private.application_state import ApplicationState, ApplicationStateManager, override_deployment_info
  from ray.serve._private.common import ApplicationStatus, DeploymentID, DeploymentStatus, DeploymentStatusInfo, DeploymentStatusTrigger
  from ray.serve._private.config import DeploymentConfig, ReplicaConfig
  from ray.serve._private.deploy_utils import deploy_args_to_deployment_info
  from ray.serve._private.deployment_info import DeploymentInfo
  from ray.serve._private.test_utils import MockKVStore
  from ray.serve._private.utils import get_random_string
  from ray.serve.exceptions import RayServeException
  from ray.serve.schema import DeploymentSchema, ServeApplicationSchema
label_desc: Use image node_id 9 for calling a global function with example usage: test_deploy_through_config_succeed(check_obj_ref_ready_nowait) without return types