Skip to content

Commit 8dca1b7

Browse files
committed
Drop test_default_base_url_matches_spec_servers as tautological
The committed openapi.json's servers[0] path is whatever URL the spec was fetched from. CONTRIBUTING.md hardcodes that fetch URL, and test_spec_path_matches_default_base_url already pins DEFAULT_BASE_URL.path into CONTRIBUTING.md and spec-drift.yml. Under the documented regeneration workflow the spec path equals DEFAULT_BASE_URL.path by construction; the only failure modes left are manual fetches from a wrong version or version bumps without regenerating, both of which code review catches.
1 parent 826d90f commit 8dca1b7

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

tests/test_docs_consistency.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Pin docs and config against runtime constants and each other to catch drift in CI."""
22

3-
import json
43
import re
54
import tomllib
65
from pathlib import Path
@@ -138,13 +137,6 @@ def test_spec_path_matches_default_base_url():
138137
assert spec_path in SPEC_DRIFT_WF
139138

140139

141-
def test_default_base_url_matches_spec_servers():
142-
# Compare paths, not full URLs, so a staging-fetched spec
143-
# (different host, same /vX.Y path) still satisfies the version pin.
144-
spec = json.loads((ROOT / "openapi.json").read_text())
145-
assert urlparse(spec["servers"][0]["url"]).path == urlparse(DEFAULT_BASE_URL).path
146-
147-
148140
def test_single_spdx_year_across_package():
149141
"""Generated files get the year injected by the openapi-python-client post-hook;
150142
hand-written files have a static year. After a new-year regen, both sets must

0 commit comments

Comments
 (0)