upgrades: Add diagnostic for held packages

- Add a new diagnostic check result for skipped tests.

Tests:

- Put a hold on a package. The diagnostic is failed.

- Remove the hold from the package. The diagnostic is passed.

- Start installing an app, then immediately run the upgrades
  diagnostics. The diagnostic is skipped.

Helps: #2347

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Allow i18n for new state 'skipped']
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy authored and Sunil Mohan Adapa committed 2024-08-25 14:22:46 -07:00
1 parent 0e8597a034
commit f08211d228
4 files changed
+28 -1

No files matched your search

+1
View File
@@ -96,6 +96,7 @@ def _run_on_all_enabled_modules():
# Four result strings returned by tests, mark for translation and
# translate later.
gettext_noop('skipped')
gettext_noop('passed')
gettext_noop('failed')
gettext_noop('error')
@@ -23,6 +23,8 @@
<span class="badge badge-danger">{% trans result.result %}</span>
{% elif result.result == 'error' or result.result == 'warning' %}
<span class="badge badge-warning">{% trans result.result %}</span>
{% elif result.result == 'skipped' %}
<span class="badge badge-secondary">{% trans result.result %}</span>
{% else %}
{{ result.result }}
{% endif %}