LCOV - code coverage report
Current view: top level - compute_tools/src/http/routes - promote.rs (source / functions) Coverage Total Hit
Test: 1e20c4f2b28aa592527961bb32170ebbd2c9172f.info Lines: 0.0 % 10 0
Test Date: 2025-07-16 12:29:03 Functions: 0.0 % 2 0

            Line data    Source code
       1              : use crate::http::JsonResponse;
       2              : use axum::Form;
       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 :     Form(safekeepers_lsn): Form<compute_api::responses::SafekeepersLsn>,
       8            0 : ) -> axum::response::Response {
       9            0 :     let state = compute.promote(safekeepers_lsn).await;
      10            0 :     if let compute_api::responses::PromoteState::Failed { error } = state {
      11            0 :         return JsonResponse::error(StatusCode::INTERNAL_SERVER_ERROR, error);
      12            0 :     }
      13            0 :     JsonResponse::success(StatusCode::OK, state)
      14            0 : }
        

Generated by: LCOV version 2.1-beta