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 <noreply@anthropic.com>
This commit is contained in:
parent
c1aeee2a8c
commit
1b5effc5d2
@ -310,8 +310,7 @@ def settings_generate_test_emails(status_type):
|
|||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
|
||||||
# Fixed test email sets per status type (Veeam only for consistent testing)
|
# 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
|
# Single email per status for simpler testing
|
||||||
# runs of the same job for proper status testing
|
|
||||||
email_sets = {
|
email_sets = {
|
||||||
"success": [
|
"success": [
|
||||||
{
|
{
|
||||||
@ -334,50 +333,6 @@ Success
|
|||||||
Processing VM-WEB01
|
Processing VM-WEB01
|
||||||
Success
|
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.""",
|
All backup operations completed without issues.""",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -405,52 +360,6 @@ Success
|
|||||||
|
|
||||||
Backup completed but some files were skipped.""",
|
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": [
|
"error": [
|
||||||
{
|
{
|
||||||
@ -476,52 +385,6 @@ Success
|
|||||||
|
|
||||||
Backup failed. Please check the logs for details.""",
|
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.""",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,6 +10,7 @@ This file documents all changes made to this project via Claude Code.
|
|||||||
|
|
||||||
### Changed
|
### 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)
|
- 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]
|
## [2026-02-09]
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user