R-130: the local-lvm minimum is named as what it does — a recommendation that warns

HARD_MIN_LVM_GIB -> RECOMMENDED_MIN_LVM_GIB; the warning says the install continues and to proceed
only with deliberately sized grows (the day0-install runbook's wording). Behaviour unchanged.
scripts/test_hostinstall.py: test_lvm_minimum_is_named_as_what_it_does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-10-05 21:17:28 +02:00
parent 17af3b65f6
commit efe76093ce
2 changed files with 16 additions and 3 deletions
+10 -1
View File
@@ -11,7 +11,7 @@ functions act on are variables the test points into the temp directory. Nothing
Where behaviour cannot be isolated, a STATIC test checks the wiring (the function is CALLED, from the
right place) — a helper defined and never called is the seam-built-never-wired shape.
Rows: R-275, R-276, R-881 (uninstall residue); R-306 (--preflight-only writes no state).
Rows: R-275, R-276, R-881 (uninstall residue); R-306 (--preflight-only writes no state); R-130 (lvm minimum wording).
Run: python3 scripts/test_hostinstall.py
"""
import os
@@ -372,6 +372,15 @@ def test_state_json_has_no_other_writer():
assert "_state_put dnsmasq_preexisting" in body, "the ownership record no longer goes through _state_put"
# ── R-130: the local-lvm minimum says what it does (it warns; the install continues) ────────────
def test_lvm_minimum_is_named_as_what_it_does():
assert not re.search(r"HARD_MIN_LVM|hard min", SRC), "a 'hard min' that only warns is back"
body = func("step_preflight")
m = re.search(r'^.*RECOMMENDED_MIN_LVM_GIB.*$', body, re.M)
assert m and "log_warn" in m.group(0) and "die" not in m.group(0), "the lvm check is not a warning: %s" % (m and m.group(0))
assert "recommended" in m.group(0) and "continues" in m.group(0), m.group(0)
def main():
tests = [(n, f) for n, f in sorted(globals().items()) if n.startswith("test_") and callable(f)]
fails = 0