One harness setup path: pipelines harness setup <claude|codex|opencode|pi>
Checks the CLI on the server's PATH (install command when missing), signs in with the harness's own login only when needed (--login forces it), keeps the OpenCode/Pi model pickers, and verifies with the server's check. Works on native and Docker installs (Docker delegates to the container setup); --host is a hidden compatibility alias. harness list shows all four harnesses' installed/signed-in/configured/default status. ./install --opencode|--pi now point to the command; ./install ends with the next-step hint.
This commit is contained in:
@@ -69,6 +69,14 @@ class HarnessSetupTests(unittest.TestCase):
|
||||
with self.assertRaisesRegex(ValueError, "run ./install"):
|
||||
setup.main()
|
||||
|
||||
def test_install_harness_flags_point_to_the_single_setup_command(self):
|
||||
install = Path(__file__).resolve().parents[1] / "install.sh"
|
||||
for flag, name in (("--opencode", "opencode"), ("--pi", "pi")):
|
||||
result = subprocess.run(["sh", str(install), flag], capture_output=True, text=True)
|
||||
self.assertEqual(result.returncode, 2)
|
||||
self.assertEqual(result.stdout, "")
|
||||
self.assertEqual(result.stderr.strip(), f"./install {flag} was removed; run: pipelines harness setup {name}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user