use super::debug_evaluation::ExpectedTablesEvaluation;
use super::debug_report_components_expected_table_count_stage::build_debug_report_components_expected_table_count;
use super::debug_still_needed::LoggingSchemaDebugStillNeeded;
use super::debug_summary::LoggingSchemaDebugSummary;
use super::debug_summary::build_logging_schema_debug_summary;
pub(super) fn build_debug_report_components_summary(
evaluation: &ExpectedTablesEvaluation,
still_needed: &LoggingSchemaDebugStillNeeded,
) -> LoggingSchemaDebugSummary {
build_logging_schema_debug_summary(
evaluation,
still_needed,
build_debug_report_components_expected_table_count(),
)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn report_components_summary_uses_expected_logging_table_catalog_count() {
let evaluation = ExpectedTablesEvaluation::default();
let still_needed = LoggingSchemaDebugStillNeeded {
required_missing_tables: Vec::new(),
optional_missing_tables: Vec::new(),
required_missing_columns: Vec::new(),
optional_missing_columns: Vec::new(),
relation_type_mismatches: Vec::new(),
};
let summary = build_debug_report_components_summary(&evaluation, &still_needed);
assert_eq!(
summary.expected_table_count,
build_debug_report_components_expected_table_count()
);
}
}