* test: deepen coverage for health doctor provider and tunnels * test: add broad trait and module re-export coverage
35 lines
906 B
Rust
35 lines
906 B
Rust
pub mod engine;
|
|
|
|
#[cfg(test)]
|
|
mod tests {
|
|
use crate::config::HeartbeatConfig;
|
|
use crate::heartbeat::engine::HeartbeatEngine;
|
|
use crate::observability::NoopObserver;
|
|
use std::sync::Arc;
|
|
|
|
#[test]
|
|
fn heartbeat_engine_is_constructible_via_module_export() {
|
|
let temp = tempfile::tempdir().unwrap();
|
|
let engine = HeartbeatEngine::new(
|
|
HeartbeatConfig::default(),
|
|
temp.path().to_path_buf(),
|
|
Arc::new(NoopObserver),
|
|
);
|
|
|
|
let _ = engine;
|
|
}
|
|
|
|
#[tokio::test]
|
|
async fn ensure_heartbeat_file_creates_expected_file() {
|
|
let temp = tempfile::tempdir().unwrap();
|
|
let workspace = temp.path();
|
|
|
|
HeartbeatEngine::ensure_heartbeat_file(workspace)
|
|
.await
|
|
.unwrap();
|
|
|
|
let heartbeat_path = workspace.join("HEARTBEAT.md");
|
|
assert!(heartbeat_path.exists());
|
|
}
|
|
}
|