Add RabbitMQ validation, test scaffolding, and config refactor

- Extract ipl() from main() with env-aware error handling (fatal in prod, warn in dev)
- Add amqp::validate() — TCP reachability check for RabbitMQ at IPL
- Refactor config::load() into load() + load_from() for testability
- Add lib.rs to expose public API to integration test harness
- Add test fixture scaffolding: tests/fixtures/beds_test.toml, tests/common/mod.rs
- Add unit tests for amqp::validate() error paths (closed port, bad address)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 19:32:24 -07:00
parent 8a89fe3403
commit c1d1ff14a5
6 changed files with 343 additions and 11 deletions

18
src/lib.rs Normal file
View File

@@ -0,0 +1,18 @@
//! # lib.rs — BEDS Public API
//!
//! Exposes BEDS modules for use by the integration test harness. All
//! application logic lives in the individual modules; this file re-exports
//! what tests need to reach.
//!
//! ## Calling Agents
//! - `tests/common/mod.rs` and all files under `tests/` — via `rustybeds::`
//!
//! **Author:** mks
//! **Version:** 1.0
//!
//! ## History
//! * `2026-04-02` - mks - original coding
pub mod amqp;
pub mod config;
pub mod logging;