Skip to content

Commit

Permalink
Test multiple errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristineTChen committed Aug 30, 2021
1 parent 367c56d commit 6a3160a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion cri/assets/dashboards/overview.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@
}
],
"template_variables": [],
"layout_type": "free",
"is_read_only": true,
"notify_list": [],
"id": 247
Expand Down
1 change: 0 additions & 1 deletion crio/assets/dashboards/overview.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"title": "CRI-O - Overview",
"description": "",
"widgets": [
{
"id": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import click

from ....utils import read_file
from ...annotations import annotate_error
from ...annotations import annotate_error, annotate_display_queue
from ...testing import process_checks_option
from ...utils import complete_valid_checks, get_assets_from_manifest, get_manifest_file
from ..console import CONTEXT_SETTINGS, abort, echo_failure, echo_info, echo_success
Expand Down Expand Up @@ -76,21 +76,20 @@ def dashboards(check):
display_queue.append(
(echo_failure, f" {dashboard_file} does not contain the required fields: {missing_fields}"),
)
annotate_error(dashboard_file, "Detected missing required fields: {}".format(missing_fields))

# Confirm the dashboard payload comes from the old API for now
if not _is_dashboard_format(decoded):
file_failed = True
display_queue.append(
(echo_failure, f' {dashboard_file} is not using the new /dashboard payload format.'),
)
annotate_error(dashboard_file, "This dashboard payload is not using the new /dashboard format")

if file_failed:
failed_checks += 1
# Display detailed info if file is invalid
echo_info(f'{check_name}... ', nl=False)
echo_failure(' FAILED')
annotate_display_queue(dashboard_file, display_queue)
for display_func, message in display_queue:
display_func(message)
display_queue = []
Expand Down

0 comments on commit 6a3160a

Please sign in to comment.