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 authored and Joseph Nuthalapati committed 2025-08-21 19:38:33 +05:30
1 parent 0cf3ffed31
commit 5cee6563cc
1 file changed
+2 -1
+2 -1
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: