Skip to content

Commit

Permalink
Grafana 9.5: Use standard UUIDs instead of short UIDs
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Sep 3, 2023
1 parent c81463a commit 7ece73d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ in progress
- Update to pandas 2.0 and requests 2.26
- CI: Update to Grafana 8.5.27, 9.5.8, and 10.1.1
- Grafana 9.3: Work around delete folder operation returning empty body
- Grafana 9.5: Use standard UUIDs instead of short UIDs

2023-07-30 0.15.2
=================
Expand Down
7 changes: 5 additions & 2 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def test_explore_dashboards_grafana7up(grafana_version, ldi_resources, capsys, c
assert dashboard["datasources_missing"][0]["type"] is None


def test_explore_dashboards_empty_annotations(create_datasource, create_dashboard, capsys, caplog):
def test_explore_dashboards_empty_annotations(grafana_version, create_datasource, create_dashboard, capsys, caplog):
# Create a dashboard with an anomalous value in the "annotations" slot.
dashboard = mkdashboard(title="foo")
dashboard["annotations"]["list"] = None
Expand All @@ -484,7 +484,10 @@ def test_explore_dashboards_empty_annotations(create_datasource, create_dashboar
assert len(data) == 1
dashboard = data[0]
assert dashboard["dashboard"]["title"] == "foo"
assert len(dashboard["dashboard"]["uid"]) == 9
if version.parse(grafana_version) >= version.parse("9.5"):
assert len(dashboard["dashboard"]["uid"]) == 36
else:
assert len(dashboard["dashboard"]["uid"]) == 9
assert "datasources" not in dashboard
assert "datasources_missing" not in dashboard

Expand Down

0 comments on commit 7ece73d

Please sign in to comment.