fix(scada): verify recovery after replay work-order completion
This commit is contained in:
@@ -97,8 +97,13 @@ def test_off_grid_feedback_uses_first_later_sample_even_without_monitoring_inter
|
||||
assert result["verified_through"] == (RETURNED + timedelta(minutes=15)).isoformat()
|
||||
|
||||
|
||||
def test_dispatch_waits_for_all_orders_and_accepts_corrected_field_completion_time():
|
||||
@pytest.mark.parametrize("replay", [False, True])
|
||||
def test_dispatch_waits_for_all_orders_and_accepts_corrected_field_completion_time(replay):
|
||||
task = {"workflow": "burst_report"}
|
||||
if replay:
|
||||
task["source"] = {"replay_context": {
|
||||
"replay_id": str(uuid4()), "knowledge_cutoff": INCIDENT.isoformat(), "batch_sequence": 3,
|
||||
}}
|
||||
for order_id in ("one", "two"):
|
||||
track_work_order(task, {"kind": "create_work_order", "action_id": str(uuid4()), "execution_status": "succeeded",
|
||||
"receipt": {"adapter": "peripheral_sample", "receipt_id": order_id}})
|
||||
@@ -120,6 +125,9 @@ def test_dispatch_waits_for_all_orders_and_accepts_corrected_field_completion_ti
|
||||
assert task["handling_context"]["returned_at"] == corrected.isoformat()
|
||||
assert task["handling_context"]["phase"] == "waiting_scada"
|
||||
assert "verification_evidence_id" not in task["handling_context"] and "last_check" not in task["handling_context"]
|
||||
if replay:
|
||||
assert task["source"]["replay_context"]["knowledge_cutoff"] == INCIDENT.isoformat()
|
||||
assert task["source"]["replay_context"]["batch_sequence"] == 3
|
||||
|
||||
|
||||
def test_field_feedback_time_requires_a_real_note_and_explicit_timezone():
|
||||
|
||||
Reference in New Issue
Block a user