Fix integrity error by adding dummy payload_hash in webhook reprocessing test
This commit is contained in:
@@ -313,9 +313,10 @@ class TestWebhookReprocessingNeverBlocksStartup:
|
|||||||
hotel_id="HOTEL123",
|
hotel_id="HOTEL123",
|
||||||
payload_json={"data": {"invalid": "data"}}, # Missing required fields
|
payload_json={"data": {"invalid": "data"}}, # Missing required fields
|
||||||
status=WebhookStatus.PROCESSING,
|
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()
|
await session.commit()
|
||||||
|
|
||||||
# This should NOT raise an exception - it should log and continue
|
# This should NOT raise an exception - it should log and continue
|
||||||
|
|||||||
Reference in New Issue
Block a user