testkit: one committed_imported
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
94f235e7ce
commit
e52e34397d
1 changed files with 1 additions and 21 deletions
|
|
@ -18,7 +18,7 @@ use eureka_pipeline::{
|
|||
PipelineTarget, QuestionOption, ResolutionOutcome, RulingAuthority, RunOperator, RunTurn, Sha, Slug, StructuralDelta, TargetInvariant,
|
||||
};
|
||||
use huginn_mind::{
|
||||
Faculty, HuginnMindRequest, ImportSource, ImportSource, HuginnMindResponse, Mind, OwnedRedbMessagePackBackingStore, PipelineAdmissionBatch, PipelineAdmissionOutcome,
|
||||
Faculty, HuginnMindRequest, ImportSource, HuginnMindResponse, Mind, OwnedRedbMessagePackBackingStore, PipelineAdmissionBatch, PipelineAdmissionOutcome,
|
||||
PipelineDocumentView, PipelineProvenance, PipelineSelectionPage,
|
||||
};
|
||||
use tempfile::TempDir;
|
||||
|
|
@ -175,26 +175,6 @@ impl TestMind {
|
|||
assert!(matches!(outcome, PipelineAdmissionOutcome::Committed { .. }), "{outcome:?}");
|
||||
}
|
||||
|
||||
/// Admits as an import of a giver's receipt committed at `committed_at`, one second after the last admission here.
|
||||
pub(crate) fn committed_imported(&self, committed_at: &str, documents: Vec<PipelineDocument>) {
|
||||
self.now.set(self.now.get() + Duration::seconds(1));
|
||||
let source = ImportSource {
|
||||
instance: Slug("giver".into()),
|
||||
receipt_id: format!("giver-{committed_at}").as_str().into(),
|
||||
ordinal: 1,
|
||||
committed_at: committed_at.into(),
|
||||
faculty: Faculty::Hands,
|
||||
agent: "test".into(),
|
||||
session: "test".into(),
|
||||
tool: "test".into(),
|
||||
external: vec![],
|
||||
};
|
||||
let provenance = PipelineProvenance { faculty: Faculty::Hands, agent: "test".into(), session: "test".into(), tool: "test".into(), imported_from: Some(source) };
|
||||
let batch = PipelineAdmissionBatch { instance: self.instance.clone(), provenance, documents };
|
||||
let outcome = self.mind.borrow_mut().admit(batch, self.now.get());
|
||||
assert!(matches!(outcome, PipelineAdmissionOutcome::Committed { .. }), "{outcome:?}");
|
||||
}
|
||||
|
||||
pub(crate) fn committed(&self, documents: Vec<PipelineDocument>) {
|
||||
let outcome = self.put(documents);
|
||||
assert!(matches!(outcome, PipelineAdmissionOutcome::Committed { .. }), "{outcome:?}");
|
||||
|
|
|
|||
Loading…
Reference in a new issue