MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / section_params

Function section_params

tests/windows/test_daemon_stability.py:158–174  ·  view source on GitHub ↗
(binary, work)

Source from the content-addressed store, hash-verified

156
157
158def section_params(binary, work):
159 cache = section_dirs(work, "params")
160 bare = run_cli(binary, cache, ["daemon"])
161 if bare.returncode == 0 or "usage:" not in out_text(bare):
162 print("RED: bare `daemon` should print usage and fail:\n%s" % excerpt(out_text(bare)))
163 return False
164 unknown = run_cli(binary, cache, ["daemon", "bogus"])
165 if unknown.returncode == 0 or "unknown daemon option" not in out_text(unknown):
166 print("RED: `daemon bogus` should be rejected:\n%s" % excerpt(out_text(unknown)))
167 return False
168 bad_port = run_cli(binary, cache, ["daemon", "start", "--port=0"])
169 if bad_port.returncode == 0 or "--port requires" not in out_text(bad_port):
170 print("RED: `--port=0` should be rejected before spawning:\n%s"
171 % excerpt(out_text(bad_port)))
172 return False
173 print("PASS: parameter surface rejects bare/unknown/out-of-range daemon invocations")
174 return True
175
176
177def section_hook_fail_open(binary, work):

Callers

nothing calls this directly

Calls 4

section_dirsFunction · 0.85
out_textFunction · 0.85
excerptFunction · 0.85
run_cliFunction · 0.70

Tested by

no test coverage detected