Skip to content

Commit 7ece73d

Browse files
committed
Grafana 9.5: Use standard UUIDs instead of short UIDs
1 parent c81463a commit 7ece73d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ in progress
99
- Update to pandas 2.0 and requests 2.26
1010
- CI: Update to Grafana 8.5.27, 9.5.8, and 10.1.1
1111
- Grafana 9.3: Work around delete folder operation returning empty body
12+
- Grafana 9.5: Use standard UUIDs instead of short UIDs
1213

1314
2023-07-30 0.15.2
1415
=================

tests/test_commands.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def test_explore_dashboards_grafana7up(grafana_version, ldi_resources, capsys, c
463463
assert dashboard["datasources_missing"][0]["type"] is None
464464

465465

466-
def test_explore_dashboards_empty_annotations(create_datasource, create_dashboard, capsys, caplog):
466+
def test_explore_dashboards_empty_annotations(grafana_version, create_datasource, create_dashboard, capsys, caplog):
467467
# Create a dashboard with an anomalous value in the "annotations" slot.
468468
dashboard = mkdashboard(title="foo")
469469
dashboard["annotations"]["list"] = None
@@ -484,7 +484,10 @@ def test_explore_dashboards_empty_annotations(create_datasource, create_dashboar
484484
assert len(data) == 1
485485
dashboard = data[0]
486486
assert dashboard["dashboard"]["title"] == "foo"
487-
assert len(dashboard["dashboard"]["uid"]) == 9
487+
if version.parse(grafana_version) >= version.parse("9.5"):
488+
assert len(dashboard["dashboard"]["uid"]) == 36
489+
else:
490+
assert len(dashboard["dashboard"]["uid"]) == 9
488491
assert "datasources" not in dashboard
489492
assert "datasources_missing" not in dashboard
490493

0 commit comments

Comments
 (0)