diagnostics: Fix notification severity when skipping tests

Fixes: #2531.

- Currently, when a diagnostics test is skipped, the notification shows up with
'error' severity. Instead of this, treat 'skipped' and 'not done' tests as
passed for the purpose of the notification.

Tests:

- Change code in package.py to set the result of diagnostic test to be 'SKIPPED'
and 'NOT_DONE', in both cases, the notification is not shown after running full
diagnostic runs.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
Sunil Mohan Adapa 2025-08-18 20:20:01 -07:00 committed by Joseph Nuthalapati
parent 0cf3ffed31
commit 5cee6563cc
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35

View File

@ -292,7 +292,8 @@ def _run_diagnostics():
severity = 'error'
else:
for check in app_data['diagnosis']:
if check.result != Result.PASSED:
if check.result not in (Result.PASSED, Result.NOT_DONE,
Result.SKIPPED):
apps_with_issues.add(app_id)
issue_count += 1
if check.result != Result.WARNING: