Skip to content

Commit

Permalink
test: Adjust hack in TestGrafanaClient for non-crashing page (#19667)
Browse files Browse the repository at this point in the history
Later Grafana versions [1] fixed the page crash on "Failed to fetch plugins
from catalog", and just log it to the console now. That will make the
"wait for false" loop timeout and eventually fail. If that happens, then
all is actually well.

[1] cockpit-project/bots#5601
  • Loading branch information
martinpitt authored Nov 29, 2023
1 parent 17dd627 commit de7ab98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/verify/check-metrics
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,10 @@ class TestGrafanaClient(testlib.MachineCase):
except RuntimeError as e:
if "Failed to fetch plugins from catalog" not in str(e):
raise
except testlib.Error as e:
if not e.msg.startswith("timeout"):
raise
# no plugin check error? great!

# Grafana auto-discovers "host" variable for incoming metrics; it takes a while to receive the first
# measurement; that event is not observable directly in Grafana, and the dashboard does not auto-update to
Expand Down

0 comments on commit de7ab98

Please sign in to comment.