LCOV - code coverage report
Current view: top level - compute_tools/src/http/routes - dbs_and_roles.rs (source / functions) Coverage Total Hit
Test: 5fe7fa8d483b39476409aee736d6d5e32728bfac.info Lines: 0.0 % 7 0
Test Date: 2025-03-12 16:10:49 Functions: 0.0 % 2 0

            Line data    Source code
       1              : use std::sync::Arc;
       2              : 
       3              : use axum::extract::State;
       4              : use axum::response::Response;
       5              : use http::StatusCode;
       6              : 
       7              : use crate::catalog::get_dbs_and_roles;
       8              : use crate::compute::ComputeNode;
       9              : use crate::http::JsonResponse;
      10              : 
      11              : /// Get the databases and roles from the compute.
      12            0 : pub(in crate::http) async fn get_catalog_objects(
      13            0 :     State(compute): State<Arc<ComputeNode>>,
      14            0 : ) -> Response {
      15            0 :     match get_dbs_and_roles(&compute).await {
      16            0 :         Ok(catalog_objects) => JsonResponse::success(StatusCode::OK, catalog_objects),
      17            0 :         Err(e) => JsonResponse::error(StatusCode::INTERNAL_SERVER_ERROR, e),
      18              :     }
      19            0 : }
        

Generated by: LCOV version 2.1-beta