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

Function section_params

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

Source from the content-addressed store, hash-verified

97
98
99def section_params(binary, work):
100 cache = os.path.join(work, "cache-params")
101 os.makedirs(cache, exist_ok=True)
102 bare = run_cli(binary, cache, ["daemon"])
103 if bare.returncode == 0 or "usage:" not in out_text(bare):
104 print("RED: bare `daemon` should print usage and fail:\n%s" % out_text(bare)[:300])
105 return False
106 unknown = run_cli(binary, cache, ["daemon", "bogus"])
107 if unknown.returncode == 0 or "unknown daemon option" not in out_text(unknown):
108 print("RED: `daemon bogus` should be rejected:\n%s" % out_text(unknown)[:300])
109 return False
110 bad_port = run_cli(binary, cache, ["daemon", "start", "--port=0"])
111 if bad_port.returncode == 0 or "--port requires" not in out_text(bad_port):
112 print("RED: `--port=0` should be rejected before spawning:\n%s"
113 % out_text(bad_port)[:300])
114 return False
115 print("PASS: parameter surface rejects bare/unknown/out-of-range daemon invocations")
116 return True
117
118
119def section_hook_fail_open(binary, work):

Callers

nothing calls this directly

Calls 2

out_textFunction · 0.85
run_cliFunction · 0.70

Tested by

no test coverage detected