use basemyai::{BASELINE_DIM, BASELINE_MODEL_ID, detect_hardware, provision};
#[test]
fn detect_hardware_returns_plausible_values() {
let hw = detect_hardware();
assert!(hw.cpu_cores >= 1, "au moins un cœur logique doit être détecté");
assert!(hw.total_ram_mb > 0, "la RAM totale doit être > 0 Mo");
}
#[tokio::test]
async fn provision_without_consent_fails_when_model_absent() {
match provision(false).await {
Err(_) => { }
Ok(p) => {
assert_eq!(p.model_id, BASELINE_MODEL_ID);
assert_eq!(p.dim, BASELINE_DIM);
assert!(p.model_path.is_dir(), "le chemin doit pointer vers un dossier existant");
}
}
}