test: refusing fakes, failure-path tests, shared panic stubs

This commit is contained in:
2026-10-25 22:25:36 +01:00
parent 06eec2feae
commit 5256c6e851
12 changed files with 555 additions and 825 deletions

View File

@@ -1,4 +1,4 @@
use domain::testing::test_movie_with_year;
use domain::testing::{NoopPersonCommand, test_movie_with_year};
use std::sync::Arc;
use chrono::Utc;
@@ -61,31 +61,6 @@ async fn stores_profile_and_indexes() {
assert_eq!(profile_repo.movie_profile_count(), 1);
}
struct NoopPersonCommand;
#[async_trait::async_trait]
impl domain::ports::PersonCommand for NoopPersonCommand {
async fn upsert_batch(
&self,
_: &[domain::models::Person],
) -> Result<(), domain::errors::DomainError> {
Ok(())
}
async fn backfill_from_credits_batch(
&self,
_: u32,
) -> Result<(u64, bool), domain::errors::DomainError> {
Ok((0, false))
}
async fn update_enrichment(
&self,
_: &domain::models::PersonId,
_: &domain::models::PersonEnrichmentData,
) -> Result<(), domain::errors::DomainError> {
Ok(())
}
}
#[tokio::test]
async fn extracts_and_indexes_persons() {
let movie_repo = InMemoryStore::new();