LCOV - code coverage report
Current view: top level - compute_tools/src/http/routes - promote.rs (source / functions) Coverage Total Hit
Test: c8f8d331b83562868d9054d9e0e68f866772aeaa.info Lines: 0.0 % 10 0
Test Date: 2025-07-26 17:20:05 Functions: 0.0 % 2 0

            Line data    Source code
       1              : use crate::http::JsonResponse;
       2              : use axum::extract::Json;
       3              : use http::StatusCode;
       4              : 
       5            0 : pub(in crate::http) async fn promote(
       6            0 :     compute: axum::extract::State<std::sync::Arc<crate::compute::ComputeNode>>,
       7            0 :     Json(cfg): Json<compute_api::responses::PromoteConfig>,
       8            0 : ) -> axum::response::Response {
       9            0 :     let state = compute.promote(cfg).await;
      10            0 :     if let compute_api::responses::PromoteState::Failed { error: _ } = state {
      11            0 :         return JsonResponse::create_response(StatusCode::INTERNAL_SERVER_ERROR, state);
      12            0 :     }
      13            0 :     JsonResponse::success(StatusCode::OK, state)
      14            0 : }
        

Generated by: LCOV version 2.1-beta