test(telegram): 修正測試斷言符合 ADR-075 中文風險等級
Some checks failed
CD Pipeline / build-and-deploy (push) Failing after 1m55s
Some checks failed
CD Pipeline / build-and-deploy (push) Failing after 1m55s
HIGH→高風險, MEDIUM→中風險 (test_sentry / test_github webhook) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -130,11 +130,12 @@ class TestTelegramMessageStructure:
|
||||
)
|
||||
result = msg.format()
|
||||
|
||||
# 驗證關鍵區塊存在
|
||||
assert "CRITICAL" in result
|
||||
# 驗證關鍵區塊存在(ADR-075 TYPE-3 新格式)
|
||||
assert "ACTION REQUIRED" in result
|
||||
assert "嚴重" in result # risk_level 改為中文
|
||||
assert "api-service" in result
|
||||
assert "INC-20260321-0001" in result
|
||||
assert "BE" in result or "後端" in result
|
||||
assert "後端" in result
|
||||
assert "88%" in result
|
||||
|
||||
def test_telegram_message_with_signoz_metrics(self):
|
||||
@@ -269,7 +270,7 @@ class TestWebhookTelegramIntegration:
|
||||
)
|
||||
|
||||
result = msg.format()
|
||||
assert "HIGH" in result
|
||||
assert "高風險" in result # ADR-075: HIGH → 高風險
|
||||
assert service_name in result
|
||||
assert alert_name in result
|
||||
|
||||
@@ -293,7 +294,7 @@ class TestWebhookTelegramIntegration:
|
||||
)
|
||||
|
||||
result = msg.format()
|
||||
assert "HIGH" in result
|
||||
assert "高風險" in result
|
||||
assert project in result
|
||||
assert culprit in result
|
||||
|
||||
@@ -315,6 +316,6 @@ class TestWebhookTelegramIntegration:
|
||||
)
|
||||
|
||||
result = msg.format()
|
||||
assert "MEDIUM" in result
|
||||
assert "中風險" in result
|
||||
assert repo in result
|
||||
assert "CI Failure" in result
|
||||
|
||||
Reference in New Issue
Block a user