athena_rs 3.26.2

Hyper performant polyglot Database driver
Documentation
//! Shared summary-layer fixtures for `/debug/schema` tests.
//!
//! These helpers centralize expected-table status-row fixture construction so
//! summary and summary-metrics tests can focus on behavior and stage boundaries
//! instead of repeating row-shape assembly details.

use super::debug_evaluation::LoggingSchemaExpectedTableStatus;

/// Builds one expected-table status row fixture for summary-related tests.
#[cfg(test)]
pub(crate) fn build_expected_table_status_for_summary_tests(
    found: bool,
) -> LoggingSchemaExpectedTableStatus {
    LoggingSchemaExpectedTableStatus {
        table_schema: "public".to_string(),
        table_name: "gateway_request_log".to_string(),
        expected_relation_type: "BASE TABLE".to_string(),
        required: true,
        purpose: "test".to_string(),
        expected_columns: vec!["request_id".to_string()],
        found,
        found_relation_type: if found {
            Some("BASE TABLE".to_string())
        } else {
            None
        },
        relation_type_matches: found,
        found_columns: if found {
            vec!["request_id".to_string()]
        } else {
            Vec::new()
        },
        missing_columns: if found {
            Vec::new()
        } else {
            vec!["request_id".to_string()]
        },
        unexpected_columns: Vec::new(),
    }
}