Default installer to full Docker setup

This commit is contained in:
2026-10-09 21:50:22 +01:00
parent f700d1beb2
commit a3e4d7817a
5 changed files with 33 additions and 23 deletions
+19 -3
View File
@@ -13,7 +13,23 @@ class InstallationTests(unittest.TestCase):
self.assertIn("--ntfy-url",result.stdout)
self.assertIn("--relogin",result.stdout)
def test_standard_installer_needs_only_go_and_honors_gobin(self):
def test_default_installer_delegates_to_docker_without_terminal(self):
with tempfile.TemporaryDirectory() as directory:
root=Path(directory)
capture=root/"args"
executable=root/"python3"
executable.write_text('#!/bin/sh\nprintf "%s\\n" "$@" > "'+str(capture)+'"\n')
executable.chmod(0o700)
env=dict(os.environ,PATH=str(root)+os.pathsep+os.environ["PATH"])
subprocess.run([str(Path(__file__).resolve().parents[1]/"install.sh")],env=env,stdin=subprocess.DEVNULL,check=True)
self.assertEqual(capture.read_text().splitlines(),["scripts/setup-docker.py"])
def test_default_installer_forwards_docker_options(self):
result=subprocess.run([str(Path(__file__).resolve().parents[1]/"install.sh"),"--help"],capture_output=True,text=True)
self.assertEqual(result.returncode,0)
self.assertIn("--ntfy-url",result.stdout)
def test_native_installer_needs_only_go_and_honors_gobin(self):
with tempfile.TemporaryDirectory() as directory:
root=Path(directory)
capture=root/"args"
@@ -21,14 +37,14 @@ class InstallationTests(unittest.TestCase):
executable.write_text('#!/bin/sh\nprintf "%s\\n" "$GOBIN" "$@" >> "'+str(capture)+'"\n')
executable.chmod(0o700)
env=dict(os.environ,PATH=str(root)+os.pathsep+os.environ["PATH"],GOBIN=str(root/"bin"))
subprocess.run([str(Path(__file__).resolve().parents[1]/"install.sh")],env=env,check=True)
subprocess.run([str(Path(__file__).resolve().parents[1]/"install.sh"),"--native"],env=env,check=True)
self.assertEqual(capture.read_text().splitlines(),[str(root/"bin"),"install","-trimpath","./cmd/...",str(root/"bin"),"run","./cmd/pipelines","skill","install"])
self.assertFalse((root/"bin").exists())
def test_standard_installer_rejects_legacy_provisioning_flags(self):
result=subprocess.run([str(Path(__file__).resolve().parents[1]/"install.sh"),"--system-command"],capture_output=True,text=True)
self.assertEqual(result.returncode,2)
self.assertIn("GOBIN",result.stderr)
self.assertIn("unrecognized arguments",result.stderr)
def test_legacy_management_requires_owned_marker(self):
with tempfile.TemporaryDirectory() as directory: