From a6d11a6d61ffd1f7af6b193c82ef113c011aab43 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sun, 3 Sep 2023 12:17:41 +0200 Subject: [PATCH] Revert "Grafana 9.4.3: Accept numeric user identifiers in log responses" This reverts commit 68df1000e0d2e6022059838d635a6aa00e209d95. --- CHANGES.rst | 1 - tests/test_commands.py | 13 ++++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 5fd3d0f..a698e41 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,7 +9,6 @@ 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.4.3: Accept numeric user identifiers in log responses 2023-07-30 0.15.2 ================= diff --git a/tests/test_commands.py b/tests/test_commands.py index b29fe17..303c9c8 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -281,7 +281,7 @@ def test_log_json_success(ldi_resources, capsys, caplog): assert item == reference -def test_log_tabular_success(ldi_resources, capsys, caplog, grafana_version): +def test_log_tabular_success(ldi_resources, capsys, caplog): # Only provision specific dashboard(s). ldi_resources(dashboards=["tests/grafana/dashboards/ldi-v27.json", "tests/grafana/dashboards/ldi-v33.json"]) @@ -294,14 +294,9 @@ def test_log_tabular_success(ldi_resources, capsys, caplog, grafana_version): # Verify output. assert 'Aggregating edit history for Grafana dashboard "ioUrPwQiz"' in caplog.text - if version.parse(grafana_version) >= version.parse("9.4.3"): - reference = """ - | Notes: n/a
[Testdrive » luftdaten.info generic trend v27](http://localhost:33333/d/ioUrPwQiz/luftdaten-info-generic-trend-v27) | User: 1
Date: xxxx-xx-xxTxx:xx:xxZ | - """.strip() - else: - reference = """ - | Notes: n/a
[Testdrive » luftdaten.info generic trend v27](http://localhost:33333/d/ioUrPwQiz/luftdaten-info-generic-trend-v27) | User: admin
Date: xxxx-xx-xxTxx:xx:xxZ | - """.strip() + reference = """ + | Notes: n/a
[Testdrive » luftdaten.info generic trend v27](http://localhost:33333/d/ioUrPwQiz/luftdaten-info-generic-trend-v27) | User: admin
Date: xxxx-xx-xxTxx:xx:xxZ | + """.strip() first_item_raw = str.splitlines(captured.out)[-1] first_item_normalized = re.sub("(.*)Date: .+|(.*)", r"\1Date: xxxx-xx-xxTxx:xx:xxZ |\2", first_item_raw, 1)