Fix integrity error by adding dummy payload_hash in webhook reprocessing test

This commit is contained in:
Jonas Linter
2025-12-01 09:21:15 +01:00
parent a1d9ef5fea
commit a80f66bd45

View File

@@ -313,9 +313,10 @@ class TestWebhookReprocessingNeverBlocksStartup:
hotel_id="HOTEL123",
payload_json={"data": {"invalid": "data"}}, # Missing required fields
status=WebhookStatus.PROCESSING,
received_at=datetime.now(UTC),
created_at=datetime.now(UTC),
payload_hash="invalidhash" # Add a dummy payload_hash to avoid integrity error
)
session.add(stuck_webhook)
session.add(stuck_webhook) ## Cannot add the stuck webhook. Integrity Error payload_hash is missing
await session.commit()
# This should NOT raise an exception - it should log and continue