Skip to content

Commit

Permalink
Revert "Grafana 9.4.3: Accept numeric user identifiers in log responses"
Browse files Browse the repository at this point in the history
This reverts commit 68df100.
  • Loading branch information
amotl committed Sep 3, 2023
1 parent 4378114 commit c81463a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=================
Expand Down
13 changes: 4 additions & 9 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand All @@ -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<br/>[Testdrive » luftdaten.info generic trend v27](http://localhost:33333/d/ioUrPwQiz/luftdaten-info-generic-trend-v27) | User: 1<br/>Date: xxxx-xx-xxTxx:xx:xxZ |
""".strip()
else:
reference = """
| Notes: n/a<br/>[Testdrive » luftdaten.info generic trend v27](http://localhost:33333/d/ioUrPwQiz/luftdaten-info-generic-trend-v27) | User: admin<br/>Date: xxxx-xx-xxTxx:xx:xxZ |
""".strip()
reference = """
| Notes: n/a<br/>[Testdrive » luftdaten.info generic trend v27](http://localhost:33333/d/ioUrPwQiz/luftdaten-info-generic-trend-v27) | User: admin<br/>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)
Expand Down

0 comments on commit c81463a

Please sign in to comment.