feat: upload alarm snapshots to webhook payloads
This commit is contained in:
@@ -128,6 +128,12 @@ zone_ids = ["1", "2", "3"]
|
||||
save_config_document(
|
||||
path,
|
||||
{
|
||||
"alarm_snapshot_upload": {
|
||||
"enabled": True,
|
||||
"service_url": "https://ota.zhengxinshipin.com",
|
||||
"secret": "change-me-in-production",
|
||||
"object_key_prefix": "cold-display/alarms",
|
||||
},
|
||||
"webhooks": {
|
||||
"enabled": True,
|
||||
"event_url": "https://example.com/events",
|
||||
@@ -146,6 +152,10 @@ zone_ids = ["1", "2", "3"]
|
||||
)
|
||||
text = path.read_text(encoding="utf-8")
|
||||
|
||||
self.assertIn("[alarm_snapshot_upload]", text)
|
||||
self.assertIn('service_url = "https://ota.zhengxinshipin.com"', text)
|
||||
self.assertIn('secret = "change-me-in-production"', text)
|
||||
self.assertIn('object_key_prefix = "cold-display/alarms"', text)
|
||||
self.assertIn("[webhooks]", text)
|
||||
self.assertIn('event_url = "https://example.com/events"', text)
|
||||
self.assertIn('case_url = "https://example.com/cases"', text)
|
||||
|
||||
Reference in New Issue
Block a user