style: repo-wide lint pass — make the lint gate green again
Push builds have been RED on the lint step since ~build 209 from accumulated formatting drift. This is the mechanical cleanup: ruff format + ruff --fix (UP038 isinstance unions, SIM105 contextlib.suppress, UP031 f-strings, SIM115 tempfile context manager), shfmt -i 2 -ci, nixpkgs-fmt/statix/deadnix (merged attrsets, dropped unused lib args), yamllint, and shell quoting fixes in tests/lasuite-docs/setup_custom_tests.sh. No behaviour changes intended; lint: PASS, unit tests: 138 passed.
This commit is contained in:
@ -88,14 +88,14 @@ def _ingest_and_count(
|
||||
Returns the events_v2 row count for (pathname, name). Raises if nothing lands within max_wait —
|
||||
a genuinely-broken ingestion path therefore FAILS (this is not a vacuous check)."""
|
||||
_register_site(base_domain, site)
|
||||
count_sql = (
|
||||
f"SELECT count() FROM events_v2 WHERE pathname = '{pathname}' AND name = '{name}'"
|
||||
)
|
||||
count_sql = f"SELECT count() FROM events_v2 WHERE pathname = '{pathname}' AND name = '{name}'"
|
||||
deadline = time.time() + max_wait
|
||||
last_status = None
|
||||
while True:
|
||||
last_status = _post_event(base_domain, site, name, pathname)
|
||||
assert last_status == 202, f"POST /api/event for {name!r} → HTTP {last_status} (expected 202)"
|
||||
assert (
|
||||
last_status == 202
|
||||
), f"POST /api/event for {name!r} → HTTP {last_status} (expected 202)"
|
||||
time.sleep(interval)
|
||||
raw = _ch(base_domain, count_sql)
|
||||
count = int(raw) if raw.isdigit() else 0
|
||||
@ -143,4 +143,6 @@ def test_custom_event_roundtrip(live_app):
|
||||
live_app,
|
||||
f"SELECT name FROM events_v2 WHERE pathname = '{pathname}' LIMIT 1",
|
||||
)
|
||||
assert stored_name == event_name, f"custom event stored as {stored_name!r}, expected {event_name!r}"
|
||||
assert (
|
||||
stored_name == event_name
|
||||
), f"custom event stored as {stored_name!r}, expected {event_name!r}"
|
||||
|
||||
@ -16,7 +16,5 @@ def test_plausible_root_serves(live_app):
|
||||
reliable health probe; the dedicated /api/health endpoint is.
|
||||
"""
|
||||
url = f"https://{live_app}/api/health"
|
||||
status, _ = harness_http.retry_http_get(
|
||||
url, expect_status=(200,), max_wait=60, interval=3
|
||||
)
|
||||
status, _ = harness_http.retry_http_get(url, expect_status=(200,), max_wait=60, interval=3)
|
||||
assert status == 200, f"GET {url} HTTP {status}"
|
||||
|
||||
Reference in New Issue
Block a user