From 1b5effc5d25e719f07f1a4d078d46f0b034ee09f Mon Sep 17 00:00:00 2001 From: Ivo Oskamp Date: Tue, 10 Feb 2026 10:14:32 +0100 Subject: [PATCH] Reduce test email generation from 3 to 1 per status User requested simpler test scenario with just 1 email per status instead of 3, making testing and debugging easier. Changes: - Success: 1 email instead of 3 - Warning: 1 email instead of 3 - Error: 1 email instead of 3 - Each button now creates exactly 1 test mail - Kept the most recent email (2026-02-09) from each set This makes it easier to test ticket linking behavior without having to deal with multiple runs per test cycle. Co-Authored-By: Claude Sonnet 4.5 --- .../src/backend/app/main/routes_settings.py | 139 +----------------- docs/changelog-claude.md | 1 + 2 files changed, 2 insertions(+), 138 deletions(-) diff --git a/containers/backupchecks/src/backend/app/main/routes_settings.py b/containers/backupchecks/src/backend/app/main/routes_settings.py index 5fde857..dc68bf1 100644 --- a/containers/backupchecks/src/backend/app/main/routes_settings.py +++ b/containers/backupchecks/src/backend/app/main/routes_settings.py @@ -310,8 +310,7 @@ def settings_generate_test_emails(status_type): from datetime import datetime, timedelta # Fixed test email sets per status type (Veeam only for consistent testing) - # All emails use the same job name "Test-Backup-Job" so they appear as different - # runs of the same job for proper status testing + # Single email per status for simpler testing email_sets = { "success": [ { @@ -334,50 +333,6 @@ Success Processing VM-WEB01 Success -All backup operations completed without issues.""", - }, - { - "from_address": "veeam@test.local", - "subject": 'Veeam Backup Job "Test-Backup-Job" finished with Success', - "body": """Backup job: Test-Backup-Job - -Session details: -Start time: 2026-02-08 01:00:00 -End time: 2026-02-08 02:10:00 -Total size: 145 GB -Duration: 01:10:00 - -Processing VM-APP01 -Success - -Processing VM-DB01 -Success - -Processing VM-WEB01 -Success - -All backup operations completed without issues.""", - }, - { - "from_address": "veeam@test.local", - "subject": 'Veeam Backup Job "Test-Backup-Job" finished with Success', - "body": """Backup job: Test-Backup-Job - -Session details: -Start time: 2026-02-07 01:00:00 -End time: 2026-02-07 02:20:00 -Total size: 152 GB -Duration: 01:20:00 - -Processing VM-APP01 -Success - -Processing VM-DB01 -Success - -Processing VM-WEB01 -Success - All backup operations completed without issues.""", }, ], @@ -405,52 +360,6 @@ Success Backup completed but some files were skipped.""", }, - { - "from_address": "veeam@test.local", - "subject": 'Veeam Backup Job "Test-Backup-Job" finished with WARNING', - "body": """Backup job: Test-Backup-Job - -Session details: -Start time: 2026-02-08 01:00:00 -End time: 2026-02-08 02:25:00 -Total size: 142 GB -Duration: 01:25:00 - -Processing VM-APP01 -Warning -Warning: Retry was successful after initial failure - -Processing VM-DB01 -Success - -Processing VM-WEB01 -Success - -Backup completed with warnings.""", - }, - { - "from_address": "veeam@test.local", - "subject": 'Veeam Backup Job "Test-Backup-Job" finished with WARNING', - "body": """Backup job: Test-Backup-Job - -Session details: -Start time: 2026-02-07 01:00:00 -End time: 2026-02-07 02:35:00 -Total size: 140 GB -Duration: 01:35:00 - -Processing VM-APP01 -Success - -Processing VM-DB01 -Success - -Processing VM-WEB01 -Warning -Warning: Some files were locked and skipped - -Backup completed with warnings.""", - }, ], "error": [ { @@ -476,52 +385,6 @@ Success Backup failed. Please check the logs for details.""", }, - { - "from_address": "veeam@test.local", - "subject": 'Veeam Backup Job "Test-Backup-Job" finished with Failed', - "body": """Backup job: Test-Backup-Job - -Session details: -Start time: 2026-02-08 01:00:00 -End time: 2026-02-08 01:10:00 -Total size: 0 GB -Duration: 00:10:00 - -Processing VM-APP01 -Success - -Processing VM-DB01 -Failed -Error: Disk space exhausted on backup repository - -Processing VM-WEB01 -Success - -Backup failed due to storage issue.""", - }, - { - "from_address": "veeam@test.local", - "subject": 'Veeam Backup Job "Test-Backup-Job" finished with Failed', - "body": """Backup job: Test-Backup-Job - -Session details: -Start time: 2026-02-07 01:00:00 -End time: 2026-02-07 01:05:00 -Total size: 0 GB -Duration: 00:05:00 - -Processing VM-APP01 -Success - -Processing VM-DB01 -Success - -Processing VM-WEB01 -Failed -Error: Network connection lost to ESXi host - -Backup failed. Network issue detected.""", - }, ], } diff --git a/docs/changelog-claude.md b/docs/changelog-claude.md index 3021813..89f61cd 100644 --- a/docs/changelog-claude.md +++ b/docs/changelog-claude.md @@ -10,6 +10,7 @@ This file documents all changes made to this project via Claude Code. ### Changed - Added debug logging to ticket linking function to troubleshoot resolved ticket propagation issues (writes to AuditLog table with event_type "ticket_link_debug", visible on Logging page, logs EVERY run import to show whether tickets were found and their resolved_at status, uses commit instead of flush to ensure persistence) +- Reduced test email generation from 3 emails per status to 1 email per status for simpler testing (each button now creates exactly 1 test mail instead of 3) ## [2026-02-09]